UTILS.
Private by default
⇄

CSV ⇄ JSON Converter

Convert CSV to a JSON array and JSON back to CSV.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

Your text and files stay on this device. Nothing is uploaded or saved by this tool.

Try a worked example

Example

Select Semicolon and Header row, enter name;note on the first line and Ada;"a;b" on the second, then choose CSV → JSON. The note remains a;b in one field. Converting [{"name":"Ada","note":"a;b"}] back to CSV quotes the semicolon correctly.

Keep in mind

CSV values stay strings. Use unique, non-empty headers. Nested JSON objects and arrays must be flattened before conversion. Editing the input or settings clears the previous result. Copy and download always use the latest completed conversion.

About this tool

Choose a delimiter and whether the first row contains headers, then convert CSV to JSON or JSON to CSV. Inspect the table alongside the complete code. CSV fields remain strings, including leading zeros. Header mode requires unique, non-empty names and equal row widths. JSON input must be an array of flat objects or arrays; nested values are rejected. Missing properties and null become empty CSV cells.

Input is limited to 5 MiB of UTF-8 text, output to 20 MiB and JSON nesting to 128 levels. Large code, tree and table previews are limited to keep the page responsive; copy and download include the complete result. Processing runs locally in a cancellable background worker, including in the downloaded offline tool.

To keep processing responsive, JSON and CSV accept up to 100,000 values or cells. SQL accepts up to 4,000 tokens and 100 nested levels.

Editing the input or settings clears the previous result. Copy and download always use the latest completed conversion.

Your text and files stay on this device. Nothing is uploaded or saved by this tool.

A real spreadsheet export, converted without an upload

Order and customer exports are where CSV conversion usually goes wrong: IDs lose their leading zeros, commas inside an address split a column, and a note typed over two lines breaks a row. This sample orders CSV (243 bytes, 3 rows, fictional data) contains all of those cases:

order_id,customer,zip,ship_to,note,total
000187,Zoë Martin,02139,"12 Elm St, Apt 3",,49.90
000188,José Núñez,07030,"9 Pier Rd",Leave at side door,120.00
000189,"Lee, Sam",94107,"400 Bay St, Unit 5","Gift — call
before delivery",15.5

Choose Open file in the tool above, keep comma as the delimiter with Header row enabled, and choose CSV → JSON. In Google Chrome 155, the downloaded JSON (518 bytes) contained three objects. The conversion kept:

  • "order_id": "000187" and "zip": "02139" as strings, with leading zeros intact
  • "ship_to": "12 Elm St, Apt 3" and "customer": "Lee, Sam" as single values, despite the commas
  • "note": "Gift — call\nbefore delivery" as one cell containing a line break
  • "note": "" for the empty cell, and the accented names unchanged

Every value is a string, including "total": "15.5". That is deliberate: guessing types is what turns 02139 into 2139. Convert numbers in your own code where you know a column is numeric. To check the result, open it in JSON Formatter; to run SQL queries over the rows instead, try Query CSV with SQL.

The sample orders are fictional and released under CC0. The CSV uses CRLF row endings with a plain line break inside the quoted note, as spreadsheet exports commonly do. Your own files are processed in your browser and are not uploaded to UtilsWorld.

Frequently asked questions

How do I use this tool?
Choose a delimiter and whether the first row contains headers, then convert CSV to JSON or JSON to CSV. Inspect the table alongside the complete code. CSV fields remain strings, including leading zeros. Header mode requires unique, non-empty names and equal row widths. JSON input must be an array of flat objects or arrays; nested values are rejected. Missing properties and null become empty CSV cells.
How does it handle my data?
CSV values stay strings. Use unique, non-empty headers. Nested JSON objects and arrays must be flattened before conversion. Your text and files stay on this device. Nothing is uploaded or saved by this tool.
Can I use large files or work offline?
Input is limited to 5 MiB of UTF-8 text, output to 20 MiB and JSON nesting to 128 levels. Large code, tree and table previews are limited to keep the page responsive; copy and download include the complete result. Processing runs locally in a cancellable background worker, including in the downloaded offline tool. To keep processing responsive, JSON and CSV accept up to 100,000 values or cells. SQL accepts up to 4,000 tokens and 100 nested levels.

More tools