Skip to content

CSV to JSON Converter

Paste a CSV export or upload the file and get an array of JSON objects, one per row, keyed by the header. Quoted fields with commas and line breaks are handled, numbers and booleans are typed only when it is safe, and nothing leaves your browser.

Loading editor...
Paste CSV
Loading editor...
Output
Auto-run ON

How to convert CSV to JSON

  1. Paste CSV into the left panel, drag a .csv file onto it, click upload (up to 5 MB) or use Load from URL. The first row must be the header.
  2. JSON appears on the right as you type. Use Tree to browse it or Code for the text; the indent dropdown sets 2, 3 or 4 spaces or tabs.
  3. Leave Delimiter on Auto, or pick Comma, Semicolon, Tab or Pipe if the guess is wrong.
  4. Keep Detect numbers/booleans ticked for typed values, or untick it to keep every cell a string.
  5. Click Copy or Download .json.

What the output looks like

Input:

id,name,email,zip,active,signup_date
1,Maya Patel,maya@example.com,02134,true,2026-01-08
2,"Lee, Jordan",jordan@example.com,10001,false,2026-02-14

Output:

[
  {
    "id": 1,
    "name": "Maya Patel",
    "email": "maya@example.com",
    "zip": "02134",
    "active": true,
    "signup_date": "2026-01-08"
  },
  {
    "id": 2,
    "name": "Lee, Jordan",
    "email": "jordan@example.com",
    "zip": "10001",
    "active": false,
    "signup_date": "2026-02-14"
  }
]

Note the zip column: because 02134 has a leading zero, the whole column stays text, so 10001 is "10001" too. Dates are always strings.

Limits and notes

  • Files up to 5 MB. For larger exports use a script; see the Python and Node examples in how to convert CSV to JSON.
  • Everything runs in your browser; nothing is sent to a server.
  • Typing rules: true and false become booleans, null becomes null, and plain decimal numbers (including 1e3) become numbers. Values with leading zeros and integers beyond 2^53 stay strings; see JSON number precision. Cells are trimmed and empty cells become "". A value such as 1.50 becomes 1.5, so untick the option if formatting matters.
  • Types are chosen per column: a column becomes numbers only if every non-empty cell is a plain number without a leading zero, booleans only if every non-empty cell is true/false, otherwise text. Empty cells stay "".
  • Rows with fewer cells than the header omit the missing keys; rows with extra cells collect them under __parsed_extra. Blank lines are skipped.
  • The output is always a flat array of objects. Dotted headers such as user.name are not turned into nested objects. Going the other way, JSON to CSV flattens nested objects into exactly those dotted columns.
  • Not sure which format to keep? See JSON vs CSV.

Frequently Asked Questions

Does my CSV need a header row?
Yes. The first row becomes the keys of every object. If your file has no header, add one line at the top with a name for each column before converting.
Why is one zip code a string and another a number?
Typing is decided per column, not per cell. If any value in a column has a leading zero (02134) or is an integer beyond 2^53, the whole column stays text so you never get a mix of strings and numbers. Untick Detect numbers/booleans to keep every cell a string.
How is the delimiter detected?
On Auto, the first rows are inspected to pick comma, semicolon, tab or pipe. If the guess is wrong, or the file has a single column, choose the delimiter explicitly from the dropdown.
What about fields that contain commas or line breaks?
Fields wrapped in double quotes are read as one value, with doubled quotes inside them unescaped, as RFC 4180 describes. "Lee, Jordan" becomes the single string Lee, Jordan.
Why did my 20-digit ID stay a string?
Integers above 2^53 cannot be stored exactly as JSON numbers in JavaScript, so they are kept as strings to avoid silent rounding. See the number precision guide linked below.
Is my data uploaded?
No. Parsing and conversion run as JavaScript in your browser tab. You can disconnect from the network after the page loads and the tool keeps working.

Guides that go with this tool

More JSON tools

JSON Viewer (Tree View)

Explore any JSON document as a collapsible tree in your browser. Click a key to copy its JSONPath, click a value to copy it, and page through large arrays without freezing the tab.

JSON Fixer: Repair Invalid JSON

Repair broken JSON in your browser. Strips markdown fences and prose, fixes trailing commas, single quotes, comments, unquoted keys, Python literals and unclosed brackets, and lists every problem it detected.

JSON to CSV Converter

Convert a JSON array of objects to CSV in your browser. Nested objects are flattened to dotted columns, values are quoted correctly, and Excel-friendly output is one click away.

JSON to YAML Converter

Convert JSON to clean YAML in your browser with 2, 3 or 4 space indentation. Strings that a YAML parser would read as numbers, booleans or dates are quoted so they survive the round trip.

YAML to JSON Converter

Convert YAML to JSON in your browser. Multi-document files become an array, anchors and aliases are resolved, and only null, true, false and plain numbers are typed, so yes, NO and dates stay strings.

JSON to XML Converter

Convert JSON to XML in your browser. Choose the root and array item element names, nulls become xsi:nil, keys are sanitised into valid XML names, and text is escaped.

XML to JSON Converter

Convert XML to JSON in your browser. Attributes are kept as @_name keys, repeated tags become arrays, numbers and booleans are detected, and invalid XML reports the line and column.

JSON Compare (Diff)

Compare two JSON documents in your browser and get a structural diff that lists every changed, added, and removed value with its JSONPath. Key order and whitespace are ignored.

JSONPath Query Tester

Test JSONPath expressions against your JSON in the browser. Pick an expression, see the matches as a JSON array with a count, and explore the results in tree view.

JSON Escape / Unescape

Escape text into a JSON string literal, unescape one back to plain text, or stringify a whole JSON document to embed it inside another JSON value or in source code.