CSV, JSON & Table Converter
Convert between CSV, pasted spreadsheet tables, JSON and Markdown tables
Loading the tool…
Reads CSV, cells copied from a spreadsheet, JSON or a Markdown table and converts it into another format. Use it to turn CSV into JSON, or a spreadsheet table into a Markdown table or SQL INSERT statements.
How to use
- Paste a table into the input box, or press "Open file" to open a .csv, .tsv, .json or .txt file.
- Leave "Input format" on "Detect automatically" and check the preview. If the first line does not hold column names, turn off "First row is the header".
- Under "Convert to", choose CSV, TSV, JSON, Markdown table, HTML table or SQL INSERT and set its options.
- Press "Copy" to take the result, or "Save file" to download it.
How it works
- A cell that contains a comma or a line break is wrapped in double quotes, and a double quote inside a cell is written twice. Input is read by the same rule.
- Nested JSON is flattened into column names joined with dots, such as user.name. When converting back to JSON, the nesting option rebuilds the original structure.
- Files are read as UTF-8, or with a legacy encoding for the page language if they are not valid UTF-8. The preview shows the first 100 rows; the conversion uses all of them.
- The pasted text is saved in this browser and is still there when you come back.
Questions and answers
- How do I convert CSV to JSON?
- Paste the CSV and choose JSON under "Convert to". With "Array of objects", the column names in the first row become the keys of each item.
- Why does my CSV show broken characters in Excel?
- Excel may read a UTF-8 file without a BOM in a different encoding. Turn on "Add UTF-8 BOM to the saved file" and download with "Save file"; Excel then shows the text correctly.
- Can I turn an Excel table into a Markdown table?
- Yes. Cells copied from Excel are detected as tab-separated. Choose "Markdown table" under "Convert to" and set "Column alignment" if needed.
- Will a value like 007 turn into 7?
- No. Even with "Turn numbers and true/false into values" switched on, values such as 007 or very long numbers stay as text.