About this tool
Spreadsheets export CSV and APIs consume JSON, so the two formats meet in almost every data task: importing a price list, moving a table into a database, or feeding a CSV export into a front end. Doing it by hand fails as soon as a field contains a comma or a line break, which is why the conversion belongs in a tool that understands quoting rather than in a text editor.
CSV quoting is where most errors come from. A field that contains the delimiter, a double quote or a newline must be wrapped in double quotes, and a literal quote inside such a field is written twice. This tool follows that rule when reading and writing, so a value like "Ann, 31" stays one field instead of silently becoming two. Empty cells become null, numeric tokens become numbers and true/false become booleans; anything else stays a string.
JSON to CSV is the harder direction, because JSON can nest. Values inside objects and arrays are written into the cell as compact JSON, so nothing is lost, but a spreadsheet will show them as text rather than as separate columns. If you need real columns, flatten the data first.
Real CSV files are less standard than the name suggests. The delimiter may be a comma, a semicolon, a tab or a pipe, and Excel chooses it from the regional settings of the machine that saved the file, so a German export opens as a single column on an English system. Encoding is the second variable: Excel writes a byte-order mark with its “CSV UTF-8” option but falls back to a local code page in older versions, which turns accented characters and CJK text into mojibake before any conversion happens. Line endings may be CRLF, LF or the old bare CR, and some exporters add a trailing blank line that shows up as an empty record. Check the first few lines with a text editor, confirm the delimiter and encoding, and remember that a BOM is not data: it must be stripped before the first header name is compared.
Spreadsheets reinterpret values as they open them, and the damage is not reversible by converting back. A 16-digit card number or a long account ID is stored as a double, so digits beyond the fifteenth are lost, and a value such as 00123 loses its leading zeros; the safe route is to format the column as text before importing, or to keep the data in JSON until it reaches its destination. Dates are parsed with the local format, so 03/04/2026 may become March or April depending on the machine, and a value such as 1-2 is read as a date in some locales. Exporting user-supplied text introduces a security problem as well: a cell that begins with =, +, - or @ can be interpreted as a formula when opened, so prefix such values with a quote or a space when the file is meant for Excel.
On the JSON side the schema matters more than the syntax. A top-level array of objects maps cleanly to rows, but an object keyed by ID does not, and a nested object has to be flattened before it can become columns. Many APIs stream one JSON object per line, known as NDJSON or JSON Lines, which is not a JSON document and will fail a strict parser; convert each line separately or wrap the lines in brackets and commas. Empty CSV cells have three plausible meanings, empty string, null and missing key, and this tool maps empty to null, which is usually right for databases but wrong for text fields where an empty string is a valid value. Key order in JSON is not semantically meaningful, yet it controls column order in the output, so sort or normalise before converting if the header must be stable.
How to use
- Choose a direction: CSV → JSON for a spreadsheet export, JSON → CSV for API data.
- Paste the source data, or use Load file to read a .csv, .tsv or .json file from your computer.
- For CSV, pick the delimiter that the file really uses and leave the header option on if the first row contains column names; for JSON, no delimiter matters.
- Press Convert and check the row and column count in the status line.
- Copy the result or download it as a file — both contain exactly what is shown on the page.
- Check the structure, not just the values: confirm the row and column counts against the source, open the first and last rows, and look for fields that contain the delimiter, quotes or line breaks, since those are where a bad export quietly splits one record into two.
- Round-trip small samples and test in the destination: convert CSV to JSON and back, then import the result into the real spreadsheet or database, because Excel, PostgreSQL and a browser each interpret dates, numbers and encoding differently.
FAQ
Are quoted fields with commas or line breaks handled?
Yes. Fields wrapped in double quotes may contain the delimiter, commas, line breaks and doubled quotes, following the usual CSV convention: a quote inside a quoted field is written as two quotes. A line break inside quotes stays part of the value and does not start a new row.
Why did my numbers turn into strings, or lose leading zeros?
Plain integers and decimals become JSON numbers, and true/false become booleans, because that is usually what a consumer expects. That also means a value such as 007 becomes 7 and a phone number loses its leading zero. If a column must stay textual, quote it in the CSV or post-process the JSON.
What happens to duplicate column names?
When converting CSV to JSON, a repeated header is renamed with a numeric suffix (name, name_2, name_3), so no value is overwritten. When converting JSON to CSV, the header contains each key once, in the order the keys are first seen.
Can I convert nested JSON into columns?
Only partly. Objects and arrays inside a record are serialised as compact JSON inside the cell, so the data survives the round trip but stays in one column. A real flattening step — deciding how nested keys map to columns — depends on your data, so it is intentionally left to you.
Why did Excel turn my long numbers into scientific notation?
Excel stores numbers as doubles, which keep about 15 significant digits, so a 16-digit card or account number loses its last digits and may be displayed as 1.23E+15. The conversion tool cannot restore digits that Excel already discarded. Format the column as text before importing, keep the original CSV, or treat such identifiers as strings end to end.
How do I keep leading zeros in a CSV?
Quote the value and make sure the consumer reads it as text: a quoted 00123 stays a string in CSV, but a converter that guesses types and a spreadsheet that guesses numbers will still drop the zeros. Disable type inference in the converter, or post-process the JSON so the field is a string; when opening in Excel, import with the column preset to text instead of double-clicking the file.
What is NDJSON and why does it fail?
NDJSON, or JSON Lines, stores one complete JSON value per line with no enclosing array. It is valid as a stream but not as a single JSON document, so a parser expecting one value reports an error at the second object. Convert line by line, or add brackets and commas to form an array before using this tool; the same applies to log exports and change-data-capture feeds.