navaja.dev / csv

CSV ↔ JSON converter

Paste CSV to get JSON, or paste JSON to get CSV. Handles quoted fields, other delimiters and nested data, and shows the table so you can check the columns.

Delimiter
JSON as
Indent

How to convert CSV to JSON

How to convert JSON to CSV

CSV quoting rules

CSV follows RFC 4180: fields containing the delimiter, a double quote or a line break are wrapped in double quotes, and a quote inside a field is written twice ("He said ""hi"""). This converter reads and writes those rules, accepts Windows (CRLF) and Unix (LF) line endings, and ignores a UTF-8 byte order mark. Downloaded CSV files include one so Excel shows accented characters correctly.

Questions

Is my data uploaded?

No. Conversion happens entirely in your browser. Nothing you paste or open is sent to a server.

How do I convert a semicolon or tab separated file?

Just paste it: the delimiter is detected automatically. You can also choose ; Tab or | yourself.

Why is my number in quotes in the JSON?

Values with leading zeros (like ZIP codes 01234), integers too big for JavaScript to hold exactly, and decimals with more digits than a double can store are kept as strings so no digits are lost. Turn off Detect numbers to keep every value as a string.

How are nested JSON objects converted to CSV?

They are flattened into dotted column names: {"address": {"city": "Paris"}} becomes a column address.city. Arrays are written into a single cell as JSON.

What is CSV injection?

A cell that starts with = + - or @ can run as a formula when the CSV is opened in a spreadsheet. Protect formulas adds an apostrophe in front so it is shown as plain text.

Does it handle line breaks inside a cell?

Yes. A quoted field can contain commas, quotes and line breaks, both when reading CSV and when writing it.

How big a file can I convert?

Up to 5 MB on each side. The table preview shows the first 100 rows.