CSV to JSON Converter
Convert CSV to JSON or JSON to CSV with header inference, custom delimiters, and proper RFC 4180 quoting.
In your browser—your files never leave your device.
Learn moreOutput will appear here…About this tool
CSV looks simple from a distance and is full of edge cases up close. RFC 4180 defines the rough rules (commas separate, double quotes escape, embedded quotes are doubled) but real-world CSV is messier — Excel emits BOMs at the start of UTF-8 files, European exports use semicolons and decimal commas, embedded newlines inside quoted fields are common in user-generated data, and the same column can contain numbers in some rows and strings in others. This converter uses PapaParse, the most battle-tested CSV library in JavaScript, which handles all of those edge cases correctly. Toggle between CSV-to-JSON and the reverse direction. Pick a delimiter. Tell it whether the first row is headers. Output is JSON with proper types (numbers become numbers, booleans become booleans) when headers are on, or arrays of arrays when they are off.
How to csv to json converter
-
Paste your data
CSV rows for CSV-to-JSON. JSON array (of objects or of arrays) for JSON-to-CSV. The input box is multi-line and accepts large pastes. For very large files (millions of rows), the browser may slow noticeably but PapaParse handles the parsing efficiently even at scale.
-
Set delimiter and header
Pick comma, semicolon, tab, or pipe from the delimiter dropdown — or choose "Custom…" and type any single character. Toggle whether the first row is headers. The parser re-runs on every change so you see the effect immediately — useful when the right delimiter is not obvious (a file claiming to be CSV that is actually semicolon-separated).
-
Read the converted output
JSON or CSV appears in the output box, with row and column counts shown so you can sanity-check that no rows were dropped or merged. If parsing fails, an error message points to the problem row.
-
Copy and use it
One-click copy sends the output to your clipboard. Paste into your import script, your fixtures file, your API call, your data analysis tool, or wherever the converted format needs to go.
Features
Bidirectional conversion
CSV to JSON in one direction, JSON to CSV in the other. Toggle at the top. Same input box, same output box, no need to learn two interfaces. Switching directions clears the input so you do not accidentally try to parse one format as the other. The conversion is symmetric in the sense that a round-trip (CSV → JSON → CSV) preserves data, though it may reformat whitespace and quoting.
Configurable delimiter
Comma is the default. Semicolon for European CSVs (where comma is the decimal separator and the same character cannot be used for both purposes). Tab for TSV files, which are common in scientific data and database dumps. Pipe for legacy data feeds. A "Custom…" option accepts any single character — caret, tilde, ASCII 0x1F unit separator, whatever your weird upstream emits. The parser handles each correctly including the quoting rules around them — embedded delimiters inside quoted fields do not break the parse, which is the whole point of RFC 4180 quoting.
Header row toggle
With Header on, the first row becomes the keys of each JSON object — output is an array of objects with named fields, which is what almost every API expects. With Header off, output is an array of arrays where you address columns by index. Pick based on what your downstream consumer wants. The header toggle also affects the reverse direction: with Header on, JSON-to-CSV writes a header row from the first object's keys; with Header off, it writes data rows only.
Type inference
Numbers and booleans are detected and converted from strings during CSV-to-JSON. So "30" becomes 30 (not "30"), "true" becomes true, "false" becomes false, empty strings become null or empty. Dates remain strings because the format is ambiguous (US MM/DD/YYYY vs ISO YYYY-MM-DD vs European DD/MM/YYYY) and silent auto-parsing causes more bugs than it solves. If you need typed dates, parse them downstream where you know the format.