How to use this CSV to JSON converter
Paste your CSV into the box — copied from a spreadsheet, exported from a database, or opened from a .csv file in a text editor — and press “Convert to JSON”. The first row is treated as the header: its values become the keys of the output objects, and every remaining row becomes one object in a JSON array, its cells matched to the headers in order. Choose pretty output for reading or minified output for feeding straight into code, then copy the result or download it as a .json file.
The parser follows the actual CSV standard rather than the naive “split on commas” approach that breaks on real data. A field wrapped in double quotes may contain commas, line breaks and quotes of its own — written doubled — and all of it stays in one piece. That matters the moment your data includes an address (“221B Baker Street, London”), a note with a comma in it, or a description spanning two lines. Windows and Unix line endings are both accepted, blank lines are skipped, and short rows are padded with empty strings so every object carries every key.
One decision is left to you, deliberately: types. CSV has none — to the format, everything is text. The default keeps it that way, so values arrive in JSON as strings, character for character. Tick “Convert numbers & booleans” and cells that look numeric become JSON numbers while true and false become booleans, which is what most APIs expect. Leave it unticked whenever leading zeros carry meaning — postcodes, phone numbers, account codes — because the number 007 is simply 7, and no converter can give the zeros back afterwards.
Example: two rows, one array
The pre-filled sample:
converts to:
Load the sample CSV to see the harder case: a quoted field containing an escaped quote and a comma — 'She said "code is poetry", often' — arriving as a single, correct value. That is the difference between a converter and a text split.
Why CSV survives every attempt to replace it
CSV is older than the web, has no types, no nesting and no official handling for half the things people put in it — and it is still the format every system on earth can read and write. Banks export it, spreadsheets open it, databases import it, and data pipelines pass it around like a common language. JSON is what the receiving code usually wants, though: structured, typed and native to the web. The CSV-to-JSON step is therefore one of the most common small translations in data work — importing a product catalogue into an online store, seeding a database from a spreadsheet, preparing test fixtures, or turning a one-off export into something an API will accept. A converter that respects quoting is the difference between that job taking thirty seconds and it taking an afternoon of hunting phantom columns.
Checking the result before you trust it
Two quick checks catch almost every conversion problem. First, the record count: the tool reports how many objects it produced — compare it with the number of data rows in your file, remembering the header is not a record. A shortfall usually means an unclosed quote swallowed several rows into one giant field. Second, spot-check the messiest row you know of — the one with the longest note or the strangest punctuation — and confirm its values landed under the right keys. If columns drift sideways from some row onwards, that row almost certainly contains an unquoted comma. Fix it at the source, in the spreadsheet, and the next export will be clean as well as this conversion.
Frequently asked questions
How does the converter use the first row?
The first row is treated as the header row: its values become the keys of every JSON object. Each following row becomes one object in the output array, with its cells matched to the headers in order. A header cell left empty is renamed column1, column2 and so on, so no field is ever lost.
Can it handle commas inside a field?
Yes. The parser follows the CSV standard (RFC 4180): a field wrapped in double quotes may contain commas, line breaks and even double quotes themselves, written doubled as "". Addresses, notes and descriptions with commas survive the conversion intact instead of splitting into extra columns.
What does “convert numbers and booleans” do?
CSV itself has no data types — every cell is text. With the option off, JSON values stay strings, exactly as written. With it on, cells that look like numbers become JSON numbers and true/false become booleans. Leave it off when leading zeros matter, such as postcodes or product codes, because 007 as a number is just 7.
What if a row has fewer or more cells than the header?
Short rows are padded with empty strings so every object has every key. Extra cells beyond the header count are ignored, because there is no key to put them under. A row that is completely blank is skipped. If a conversion looks wrong, an unquoted comma in the data is the usual reason a row grew extra cells.
Why did I get an “unclosed quoted field” error?
Somewhere a field opens with a double quote and never closes. Everything after that quote — commas and newlines included — is legally part of the field, so the parser reaches the end of the file still waiting. Find the stray quote, usually in a hand-edited row, and either close it or remove it.
Should I choose pretty or minified output?
Pretty output — indented with one field per line — is for people: reviewing, debugging and pasting into documentation. Minified output, a single line, is for machines: feeding an API, storing in a database field or embedding in a request. The data is identical either way.
Is my CSV uploaded to a server?
No. The file is parsed in your browser and never transmitted. Customer lists, sales exports and internal spreadsheets stay on your device — which is exactly where data like that belongs — and the tool keeps working offline once loaded.
Does it work with Excel files?
Not directly — this tool reads CSV text. In Excel or Google Sheets, use “Save as” or Download to export the sheet as a CSV file, then paste its contents here. Watch the export settings: choose UTF-8 encoding if your data contains accented characters, so they arrive intact.
What about semicolon-separated files?
Some European Excel versions export with semicolons instead of commas. This converter expects commas, so a semicolon file would arrive as one wide column. Re-export with commas if you can, or find-and-replace semicolons with commas first — but only if your data contains no semicolons inside the fields themselves.