CSV to JSON Converter
Developer Tools · Added 18 August 2026
Paste a CSV export and get JSON, or paste JSON and get a CSV you can open in a spreadsheet. The parser follows RFC 4180 rather than splitting on commas, so quoted fields containing commas, quotes or line breaks survive intact — which is where most online converters mangle an address column.
How to use the csv to json converter
- 1Choose the direction: CSV to JSON, or JSON to CSV.
- 2Paste your data. The delimiter is detected automatically, or set it yourself.
- 3Decide whether the first row is a header and whether numbers and true/false should be converted from text.
- 4Press Convert. Warnings appear for ragged rows and duplicate column names.
- 5Copy the result, download it as a file, or send it back the other way to check the round trip.
Examples
A CSV with a comma inside a field
- Input
- id,name,city\n1,Ada,"London, UK"
- Result
- [{ "id": 1, "name": "Ada", "city": "London, UK" }]
The quoted comma stays part of the value instead of splitting the row.
Nested JSON to CSV
- Input
- [{ "id": 1, "user": { "name": "Ada", "email": "ada@example.com" } }]
- Result
- id,user.name,user.email — nested objects become dotted column names
A semicolon-delimited European export
- Input
- id;name;amount\n1;Ada;1234,50
- Result
- Semicolon detected automatically; "1234,50" stays a string because the comma is a decimal mark
About the csv to json converter
CSV is not as simple as it looks
The format has no official specification older than RFC 4180 from 2005, and that document describes common practice rather than mandating it. In the wild you will meet comma, semicolon and tab delimiters, three kinds of line ending, optional quoting, doubled quotes inside quoted fields, byte-order marks, and header rows that are sometimes absent.
Splitting a line on commas handles none of that. It works on the sample file and breaks on the real one, usually at the row containing an address or a company name with a comma in it — and it breaks silently, shifting every subsequent column by one.
The conversions that need a decision
CSV has exactly one type: text. JSON has strings, numbers, booleans, null and nested structures. Going from CSV to JSON therefore requires guessing, and every guess has a case where it is wrong. '007' is a number to a naive parser and an agent number to a human; 'TRUE' is a boolean in one column and a string in another.
The rules used here are conservative and stated on the page: a value becomes a number only when it round-trips cleanly, which excludes leading zeros and leading plus signs, and an empty cell becomes null rather than an empty string. Where that is not what you want, the switch to turn it off is right there.
Going back the other way
JSON to CSV is flattening a tree into a rectangle, and something always has to give. Nested objects become dotted columns, which is lossless and readable. Arrays do not, so they are written as JSON text inside a cell — ugly but reversible, which beats a column layout that breaks on the first row with an extra item.
Columns are collected as the union of every row's keys in first-seen order, so a record missing a field still lines up under the right heading instead of shifting everything left. Values are quoted only when they need it: when they contain the delimiter, a quote, a line break, or leading and trailing spaces that a trimming parser would otherwise eat.
Frequently asked questions
Why did my postcode lose its leading zero?
What happens if a row has more or fewer fields than the header?
How are duplicate column names handled?
What does flattening do to nested objects?
Which line endings should I choose for Excel?
Is my data uploaded anywhere?
Related tools
JSON Formatter
Developer Tools
Pretty-print, minify and inspect JSON with precise error positions.
JSON Validator
Developer Tools
Check JSON validity and get a structural summary — depth, key count and type breakdown.
JSON to YAML Converter
Developer Tools
Convert JSON to YAML or YAML back to JSON, with the ambiguous values quoted.