CSV to JSON Converter
Spreadsheets speak CSV; APIs and apps speak JSON. Paste your CSV — or drop in a file — and get properly structured JSON back, with quoted fields, embedded commas, and delimiters handled the way the format actually specifies.
How to use
- Paste or upload. Drop CSV text into the box, or upload a .csv file straight from your machine — it's read in the browser, never uploaded to a server.
- Leave the delimiter on auto unless you know it's unusual. Commas, semicolons (common in European Excel exports), tabs, and pipes are detected from the first rows.
- Choose your types. By default every value stays a string, exactly as CSV stores it. Tick the types option if you want numbers and booleans converted — useful for feeding an API, dangerous if your data has leading-zero codes like "007".
- Copy or download the resulting JSON, ready for your app, fixture file, or API request body.
CSV looks simple. It isn't — and that's why converters exist
CSV has no official specification in the way JSON does — just decades of convention and one widely followed memo (RFC 4180). The trouble spots are always the same. A field containing the delimiter must be wrapped in double quotes: "party hat, slightly tilted" is one field, not two. A field containing a quote escapes it by doubling: "say ""hello""". And a quoted field can contain literal line breaks, which means you cannot parse CSV by splitting on newlines first — a mistake baked into countless quick scripts. This converter parses character by character with quoting rules applied in the right order, so those cases come out as single, correct values.
The other silent trap is types. In CSV, everything is text — 42, "42", and a product code 042 are just characters. JSON has real types, so a converter has to choose: keep everything a string (lossless, and the default here) or guess that numeric-looking fields are numbers. Guessing is convenient for API payloads and charts, but it mangles ZIP codes, SKUs, and anything with meaningful leading zeros. That's why type conversion is an option you switch on, not a surprise you discover later.
Headers deserve one warning too. With "first row is headers" on, each row becomes a JSON object keyed by the header names — the shape almost every API wants. If your CSV has duplicate header names or rows with more fields than headers, later values win and extras are dropped, following the convention of most CSV libraries. Check the row and column counts under the output; if they don't match your source, the input probably has a ragged row, and the count mismatch is your clue.
Frequently asked questions
Is my CSV uploaded to a server?
No. The file picker reads the file locally in your browser and the conversion runs in JavaScript on this page. Nothing is transmitted, stored, or logged — which also means the tool works offline once loaded.
Why did my numbers stay strings?
Because CSV itself has no types — every field is text. By default the converter preserves that faithfully. Tick "Convert numbers and true/false to JSON types" if you'd rather have 42 as a number and true as a boolean in the output.
My Excel export uses semicolons. Will it work?
Yes. Excel in many European locales exports with semicolons because commas are decimal separators there. Auto-detect checks the first rows and picks the delimiter that produces a consistent column count — or choose semicolon manually.
What happens with quoted fields and commas inside them?
They're handled per the standard CSV rules: a field wrapped in double quotes keeps its commas, line breaks, and doubled-quote escapes ("") as data. The sample text in the box includes one, so you can see it convert correctly.
What's the difference between the two output shapes?
With headers on, you get an array of objects — [{"name": "Pippin", ...}] — the shape APIs expect. With headers off, you get an array of arrays — [["name", "hat"], [...]] — which preserves the grid exactly as-is, header row included as data.
Related tools
Keep the momentum going.