CSV to JSON Converter

Convert CSV to JSON and JSON to CSV, with a table preview.

About this tool

Paste CSV to get an array of JSON objects, or paste JSON to get CSV back. The delimiter is detected automatically (comma, semicolon, tab or pipe), quoted fields and line breaks inside quotes are handled, and nested JSON objects are flattened into dotted column names.

How to use it

  1. Paste CSV exported from a spreadsheet or database, or paste a JSON array of objects.
  2. The direction and the delimiter (comma, semicolon, tab or pipe) are detected automatically; override them if needed.
  3. For CSV, choose whether the first row is the header and whether numbers and true/false become typed values.
  4. Check the table preview, then copy the output.

Questions

My Excel CSV uses semicolons. Will it work?
Yes. Excel in many European locales saves CSV with semicolons, and the delimiter is detected from the data. You can also pick it manually.
How are commas or line breaks inside a value handled?
Values wrapped in double quotes may contain the delimiter and line breaks, and a doubled quote ("") inside them stands for one quote character, as defined in RFC 4180.
What happens to nested objects when converting JSON to CSV?
They are flattened into dotted column names, so {"address": {"city": "Oslo"}} becomes a column called address.city. Arrays are written as JSON text in a single cell.
Are leading zeros and phone numbers kept?
Yes. Only plain numbers become JSON numbers, so values like 00123, +48 600 100 200 or very long IDs stay text. Turn off Numbers and booleans to keep every value as text.

Something not working, or a result looks wrong? Report a problem with this tool