CSV <> JSON Converter

Convert CSV to JSON and JSON to CSV in your browser. It handles quoted values, line breaks inside cells and any separator, and it never turns codes like 007 into numbers.

  • Handles quotes and multi-line cells
  • Detects the separator for you
  • Nothing is uploaded

3 rows · 5 columns

Separator in use: comma. Numbers are converted only when that cannot change them, so 007, +15551234567 and very long IDs stay as text.

CSV input

JSON output

[
  {
    "id": 101,
    "name": "Acme Corp",
    "email": "[email protected]",
    "active": true,
    "revenue": 450000.5
  },
  {
    "id": 102,
    "name": "Globex, Inc",
    "email": "[email protected]",
    "active": false,
    "revenue": 12000
  },
  {
    "id": 103,
    "name": "Soylent Corp",
    "email": "[email protected]",
    "active": true,
    "revenue": 88900.25
  }
]

Preview

idnameemailactiverevenue
101Acme Corp[email protected]true450000.5
102Globex, Inc[email protected]false12000
103Soylent Corp[email protected]true88900.25

What it does

Choose a direction, paste your data or open a file, and the converted result appears as you type. For CSV the separator is detected for you, or you can pick comma, semicolon, tab or pipe. A preview table shows the first rows so you can check the columns lined up, and Convert back sends the result straight back through in the other direction to prove nothing was lost.

Why conversion should not change your data

A CSV has no types: every value is text. Turning it into JSON means deciding which values are numbers, and a careless converter guesses wrong. Zip codes and product codes such as 007 lose their zeros, phone numbers lose their plus sign, and long IDs are rounded because JavaScript cannot hold them exactly. Here a value becomes a number only when it is a plain number of up to 15 digits with no leading zero or sign. Everything else stays as text.

Plain numbers do get normalised, as JSON requires: 450000.50 becomes 450000.5. If you need every value exactly as written, untick the option and all values stay as text. Going the other way, from JSON to CSV, numbers are copied exactly as they were written.

Quoting rules that spreadsheets expect

CSV looks simple until a value contains the separator, a quote or a line break. The standard answer (RFC 4180) is to wrap such a value in double quotes and write any quote inside it twice. This converter reads and writes that format, so a cell that contains a comma, or a whole address spread over two lines, stays in one cell instead of breaking the row. Files from Excel often start with an invisible byte-order mark, which is removed so it does not end up in your first column name.

Converting JSON to CSV

A CSV is a flat table, but JSON can nest. By default nested objects are flattened into columns named with dots, such as stats.clicks, and arrays are written into one cell as JSON text. Objects do not all need the same keys: the columns are the union of every key, in the order they first appear, and missing values are left empty. A list of plain values, such as [1, 2, 3], becomes a single column named value.

Frequently asked questions

Is my data uploaded?

No. Files you open and text you paste are converted in your browser and never sent to a server.

Why did 007 stay as text instead of becoming a number?

Numbers are converted only when that cannot change them. Values with leading zeros (007), a plus sign (+15551234567) or more than 15 digits would be altered by becoming JSON numbers, so they stay as text. Untick "Convert numbers and true/false" to keep every value as text.

What happens to nested JSON when I convert it to CSV?

Nested objects are flattened into columns with dotted names, such as stats.clicks. Arrays are written into a single cell as JSON text. You can turn flattening off, in which case a nested object is written to one cell as JSON.

Which separators does it support?

Comma, semicolon, tab and pipe. For CSV input it detects the separator automatically, and you can choose one yourself.

Why do accents look wrong when I open the CSV in Excel?

Excel needs a byte-order mark to read a UTF-8 file correctly. Files saved with Download include one. Text you copy does not, so use Download for Excel.

What if some rows have a different number of cells?

The tool tells you. Extra values are kept in columns named column_N, and missing values are left empty, so nothing is silently dropped.

How large a file can I convert?

Files up to 20 MB can be opened, and the practical limit is your device's memory. The preview shows the first rows so the page stays responsive.

More tools like this

All tools →