CSV to JSON Converter
Turn CSV into JSON, or JSON into CSV, with delimiter detection, headers, number types and nested objects flattened. Paste or open a file.
How to convert CSV to JSON
- Paste your CSV into the box, or press Open a file. A file ending in .json switches to JSON to CSV by itself.
- Check the separator (it is detected for you) and whether the first row holds the column names.
- Choose the JSON shape: a list of objects (one per row, the usual choice), a list of lists, or JSON Lines for log tools and databases.
- Copy the JSON or download it as a file. The table under the boxes shows how your data was read.
How to convert JSON to CSV
- Choose JSON to CSV and paste a list of objects, a single object, or an object that holds a list (such as an API response with a "data" list). JSON Lines works too.
- Every key found in any object becomes a column. Nested objects become dotted column names unless you turn flattening off.
- Pick the separator, and turn on Excel-friendly if you will open the file in Excel.
- Download the .csv file, or press the switch button to convert the result back and check it.
Example
This CSV:
id,name,city
1,Aisha Khan,Lahore
2,"Smith, John",London
becomes this JSON (with numbers detected):
[
{ "id": 1, "name": "Aisha Khan", "city": "Lahore" },
{ "id": 2, "name": "Smith, John", "city": "London" }
]
The quotes around "Smith, John" tell the reader that the comma is part of the name, not a new column. The converter writes these quotes for you when it makes CSV, following the RFC 4180 standard.
Frequently asked questions
Is my data uploaded?
No. The conversion happens in your browser, so customer lists, exports and other private data never leave your device. You can even disconnect from the internet after the page loads.
My CSV uses semicolons. Will it work?
Yes. The converter looks at the first lines and picks the separator that splits them most evenly: comma, semicolon, tab or pipe. Spreadsheets in many European countries save CSV with semicolons because the comma is their decimal mark. You can also choose the separator yourself.
What does "Detect numbers and true/false" do?
It turns 42 and 3.5 into JSON numbers, true and false into booleans, and empty cells into null. Values with leading zeros, such as 007 or a phone number, and numbers longer than 15 digits stay as text, so nothing is lost. Turn it off to keep every value as text.
How is nested JSON turned into columns?
Nested objects become columns with dotted names: {"address": {"city": "Lahore"}} becomes a column called address.city. Lists, such as ["admin", "editor"], are kept as JSON text in one cell. Turn off Flatten nested objects to keep whole objects as JSON in one cell.
Why do accented letters look wrong when I open the CSV in Excel?
Older versions of Excel assume a different character set unless the file starts with a byte order mark. Turn on Excel-friendly (UTF-8 BOM) before downloading, and names like María and Zürich will show correctly.
How large a file can I convert?
Up to 20 MB. Very large files can make the page slow while it works; the preview shows the first 50 rows, and the download contains everything.
Related tools
Browse all tools- Base64 Encoder and Decoder Encode text or files to Base64 and decode Base64 back to text or a file, with UTF-8, URL-safe and data URL options.
- Number Base Converter Convert numbers between binary, octal, decimal and hexadecimal (or any base from 2 to 36), and text to binary or hex.
- Image Converter Convert images between JPG, PNG, WebP, AVIF and ICO, resize them, and download one by one or as a ZIP. Nothing is uploaded.
- Color Converter Convert colours between HEX, RGB, HSL, HWB, CMYK and OKLCH, pick from the screen, and check contrast for readable text.