Convert CSV to JSON or JSON to CSV. Supports custom delimiters, header rows, and dynamic typing.

Delimiter:
Input — CSV
Output — JSON
Ctrl+Shift+CCopyCtrl+KClear

Share this tool

Found it useful? Help a fellow developer discover it.

https://developertoolkit.dev/tools/csv-to-json

What is CSV to JSON conversion?

CSV (Comma-Separated Values) is a plain text format used by spreadsheets, databases, and data exports. JSON (JavaScript Object Notation) is the standard format for APIs and web applications. Converting between the two is one of the most common data tasks developers face, whether you are importing a spreadsheet into a database, preparing data for an API, or exporting API responses back to a spreadsheet. This tool handles both directions with full control over how the conversion works. You can choose the delimiter used in your CSV. You can tell the tool whether the first row contains column headers. You also get properly typed JSON output, where numbers stay as numbers and booleans stay as booleans rather than being wrapped in quotes. The reverse direction converts any JSON array into a flat CSV that opens correctly in Excel or Google Sheets. All processing happens in your browser with no data uploaded to any server.

How to use

  1. Paste CSV into the left panel, or JSON into the right panel and switch the direction toggle to convert the other way.
  2. Pick a delimiter, or leave it on Auto-detect for files exported from Excel, Google Sheets, or a database client.
  3. Toggle First row is header off if the file has no header row. Each row then becomes a plain array instead of a keyed object.
  4. Numbers and booleans are typed automatically. Quoted fields in the CSV are always kept as strings, even if they look numeric.
  5. Copy the output, or download it as a .json or .csv file depending on the direction.

Example conversion

CSV input

id,name,active
1,Ada,true
2,Grace,false

JSON output

[
  { "id": 1, "name": "Ada", "active": true },
  { "id": 2, "name": "Grace", "active": false }
]

Note that id and active came out as a number and a boolean, not strings, because dynamic typing is on by default. Turn it off if you need every value kept as a string, which matters when an ID happens to look numeric but should never be treated as one, like a zip code with a leading zero.

Frequently Asked Questions

Does the first row need to be a header?

No. You can toggle "First row is header" on or off. When it is on, the first row becomes the property keys in each JSON object. When it is off, the output is an array of arrays where each row is a plain array of values.

What delimiters are supported?

Auto-detect, comma (,), semicolon (;), tab, and pipe (|). Auto-detect works well for most files exported from Excel, Google Sheets, or any standard CSV tool. Use a specific delimiter if auto-detect produces incorrect results.

Can I convert nested JSON objects back to CSV?

CSV is a flat format, so nested objects in JSON cannot be represented directly. The converter will flatten the top-level array. If your JSON contains deeply nested structures, consider using the JSON Formatter first to understand the shape, then flatten manually before converting.

Is there a file size limit?

There is no hard limit because everything runs in your browser. For very large files (50 MB or more), conversion may be slow depending on your device. The editor debounces large inputs to avoid freezing while you type.

Are numbers and booleans preserved when converting CSV to JSON?

Yes. Dynamic typing is enabled by default, so values like "42", "3.14", "true", and "false" are parsed into their native JSON types rather than kept as strings. Quoted values in the CSV are always treated as strings.

Related Tools

From the Blog

The Browser Tools Every Developer Actually Needs in 2026

A no-fluff guide to browser tools developers actually reach for. JSON formatters, JWT decoders, regex testers, and more. Privacy-first, no sign-up.

Read article