Table to Ruby Array Converter

Paste rows or drop a CSV or Excel file, pick Ruby as the output format, and copy the data = [[...]] array into your project. The first row is the header, every other row is one nested array, and numbers are written as numbers so you can iterate over them right away.

Values use single-quoted Ruby strings, so nothing inside a cell is ever interpolated: backslashes and single quotes are escaped, and a line break inside a cell becomes \n. A blank cell becomes nil rather than an empty string, so missing and empty stay distinguishable.

Table to Markdown

Turn a table into text you can paste: Markdown, HTML, TSV, SQL inserts, JSON, XML, YAML, LaTeX, INI, TOML, JSON Lines or an ASCII table. Nothing is uploaded.

Your data never leaves this browser

The file is parsed, previewed and charted on your own device. Nothing is uploaded — not even a sample. Close the tab and the data is gone.

Or paste table text

How it works

  1. 1.Import the table (Excel, CSV, TSV or JSON, or paste), then pick the output format: Markdown, HTML, SQL INSERT, JSON, XML, YAML, LaTeX, vCard, iCal, pandas and more.
  2. 2.For SQL, set the table name; for vCard and iCal, map which column holds which field — a field you leave empty is simply not written out.
  3. 3.Press Generate and check the result on the right.
  4. 4.Copy it or download it. Rows that cannot become a usable contact or event are skipped rather than written out half-empty.

Frequently asked questions

Why a nested array instead of an array of hashes?
A nested array keeps the column order and still works when the header row has blanks or duplicate names. If you want hashes, zip the first row with each of the others and call to_h on the result.
Do numbers and empty cells come out as strings?
Numbers stay unquoted, so you can sum or compare them directly. Blank cells become nil, text is quoted and escaped, and columns that look numeric but must stay text (dates, IDs with leading zeros) are quoted as well.

Related tools

Table to SQL INSERT Generator

Turn a CSV or Excel table into SQL INSERT statements in your browser: the header row becomes the column list, quotes are escaped, blanks become NULL.

CSV to Markdown Table Converter

Turn a CSV, Excel or JSON table into a Markdown table for a README, a Notion page or a pull request. Pipes and line breaks are escaped in the browser.

CSV to XML Converter

Turn a CSV, Excel or JSON table into well-formed XML in your browser: column names become element names, special characters are escaped, blanks stay empty elements.

CSV to YAML Converter

Turn a CSV, Excel or JSON table into a clean YAML list, with values quoted whenever they would otherwise be read back as numbers, booleans or null.

CSV to LaTeX Table Converter

Turn a CSV or Excel table into a ready-to-paste LaTeX tabular environment, with ampersands, percent signs, underscores and backslashes escaped.

CSV to JSON Lines (JSONL) Converter

Turn a CSV or Excel table into JSON Lines: one JSON object per line, ready for jq, log pipelines and bulk imports.

CSV to INI Converter

Turn a CSV or Excel table into INI sections: one numbered block per row with key=value lines, ready for legacy config files and importers.

CSV to TOML Converter

Turn a CSV or Excel table into TOML using an array of tables, with numbers kept numeric, blank cells written as empty strings and non-Latin keys quoted.

CSV to ASCII Table Converter

Turn a CSV or Excel table into an ASCII box table for logs, code comments and plain-text docs, with CJK characters aligned to double width.

Table to PHP Array Converter

Turn a CSV or Excel table into a PHP array in your browser: the header row becomes the first entry, numbers stay numbers and blank cells become null.