CSV to JSON Converter

Convert CSV to JSON and JSON to CSV instantly. Handles quoted fields, auto-detects headers. Free, browser-based, no server required.

  • Runs in your browser
  • Your data never leaves your browser
  • Free · No Sign-Up
For CSV → JSON, converts unquoted numbers, true, false and null. Quoted values, leading-zero values and unsafe integers remain text. Changing this option reconverts the current CSV.
For CSV → JSON, writes unquoted empty fields as null instead of an empty string. Quoted empty fields remain strings. Changing this option reconverts the current CSV.
Clears both panes, the status and pending conversion. Options stay selected. Ctrl+L (⌘+L on Mac) also clears while focus is inside this tool.
Paste comma-separated CSV with a header and at least one data row. After 0.3 seconds without typing, JSON updates. Quoted commas, line breaks and doubled quotes are supported.
Copies all current CSV text, including your edits. An empty pane cannot be copied.
Paste a non-empty array of JSON objects. After 0.3 seconds without typing, CSV updates. Nested objects become dot-path columns; arrays and empty objects are written as JSON text.
Copies all current JSON text, including your edits. An empty pane cannot be copied.
Examples, details and FAQ Worked examples, how it compares with other tools, and answers to common questions.

Worked Examples

Simple table

Input CSV:

name,age,city
Alice,30,London
Bob,25,Paris

Output JSON contains objects with name, age, and city keys for each row.

Quoted fields with commas

Input CSV:

product,description,price
Widget,“Small, round widget”,9.99
Gadget,“Includes ""turbo"" mode”,24.50

The description field contains a comma and escaped quotes — both are handled correctly.

JSON back to CSV

Paste the JSON output back into the JSON panel. After 0.3 seconds without typing, it converts to CSV automatically.

Supported CSV Format

This tool follows the RFC 4180 standard. Fields are separated by commas. If a field contains a comma, newline, or double-quote, it must be enclosed in double quotes. A literal double-quote inside a quoted field is escaped as two consecutive double-quotes (""). The first row is always interpreted as column headers.

Edge Cases: What This Converter Does

Empty fields. In this CSV, Bob has no email and row 3 has no name:

id,name,email
1,Alice,alice@example.com
2,Bob,
3,,charlie@example.com

By default an empty field becomes "". Tick Empty → null to get null instead:

[
  { "id": 1, "name": "Alice", "email": "alice@example.com" },
  { "id": 2, "name": "Bob", "email": null },
  { "id": 3, "name": null, "email": "charlie@example.com" }
]

Type inference. With Parse numbers & booleans ticked (the default), unquoted true, false, and null (any case) become JSON literals and numbers become JSON numbers. Three kinds of values stay strings so that nothing is lost: quoted fields ("42"), values with a leading zero (007, 0123), and integers too large for a JavaScript number (above 2^53 − 1), such as long order IDs.

Header row. The first row is always the header. A CSV without one needs a header line added before converting. If two columns share a name, the later column overwrites the earlier one in each object, so rename duplicates first. Fields beyond the last header are dropped; missing trailing fields are treated as empty.

Delimiter. Only commas are recognized. Convert semicolon- or tab-separated files to commas first.

JSON → CSV. The input must be an array of objects. The columns are every key that appears in any object, in the order the keys first appear; a row without a key gets an empty field. Nested objects are flattened into dot-path columns such as user.name (the same layout as pandas json_normalize), arrays and empty objects are written as JSON text, and null becomes an empty field:

[
  { "id": 1, "user": { "name": "Alice", "city": "London" }, "tags": ["admin", "ops"], "manager": null },
  { "id": 2, "user": { "name": "Bob" } }
]
id,user.name,user.city,tags,manager
1,Alice,London,"[""admin"",""ops""]",
2,Bob,,,

Converting that CSV back to JSON does not rebuild the nesting: user.name stays a flat key and the array stays a string.

FAQ

What CSV format is supported?

Standard RFC 4180 CSV: comma-separated values with optional double-quote escaping. Quoted fields may contain commas, newlines, and escaped quotes.

How are headers handled?

The first row of your CSV is always treated as headers. Each subsequent row becomes a JSON object whose keys are the header values.

Is there a maximum file size?

There is no hard limit — processing happens in your browser. Practically, files up to a few MB convert instantly; very large files may slow down depending on your device.

Is my data sent anywhere?

No. All conversion runs in your browser using JavaScript. Your data never leaves your machine.