CSV to JSON Converter – and JSON to CSV
Convert CSV files and spreadsheet exports to JSON, or turn a JSON array back into CSV. The converter detects commas, semicolons, tabs and pipes, handles quoted fields with commas and line breaks inside, and can turn numbers and true/false into real JSON types.
How to use the CSV to JSON converter
- Choose CSV → JSON or JSON → CSV.
- Paste your data, or press Try an example.
- Choose the delimiter or leave it on automatic detection.
- For CSV → JSON, choose whether the first row is a header and whether to convert numbers and true/false.
- Copy the result or Download it as a file.
How the conversion works
CSV → JSON with a header row: the first row gives the keys; every following row becomes an object.
name,country,score
Ada,UK,98
becomes
[{"name": "Ada", "country": "UK", "score": 98}]
Without a header, each row becomes an array of values.
JSON → CSV: the input must be an array. For an array of objects, the header row is every key found; missing values become empty cells. For an array of arrays, each inner array is one row.
CSV rules the converter follows
- Fields are separated by the delimiter.
- A field containing the delimiter, a double quote or a line break is wrapped in double quotes.
- A double quote inside a quoted field is written twice:
"say ""hi""". - Lines can end with Windows (CRLF) or Unix (LF) line breaks.
- Empty lines are ignored.
Working with Excel and Google Sheets
To get CSV from a spreadsheet, use File → Download → CSV in Google Sheets or Save As → CSV in Excel. To open converted CSV in Excel with accents and non-Latin characters intact, import it using UTF-8 encoding (Data → From Text/CSV). Excel in many European languages expects semicolons, so choose the semicolon delimiter when exporting JSON to CSV for those users.
Large files
The converter works on files of several megabytes in a modern browser. For very large exports — hundreds of thousands of rows — a command-line tool or a script is faster. Because everything happens on your device, the limit is your device’s memory, not an upload size. If the browser becomes slow, split the CSV into smaller parts and convert each one.
Data types and leading zeros
CSV has no data types: everything is text. When “Convert numbers” is on, values that look like numbers become JSON numbers, but values with leading zeros — postcodes, ZIP codes, phone numbers and product codes such as 00123 — are left as text so the zeros aren’t lost. If a column must always stay text, turn the option off.
Common uses
- Turning a spreadsheet into data for a website, app or API.
- Creating test fixtures and seed data.
- Exporting API results to a spreadsheet for analysis.
- Moving data between tools that speak different formats.
Tidy your JSON with the JSON formatter, or convert configuration files with YAML to JSON.
Frequently asked questions
How do I convert CSV to JSON?
Paste your CSV, leave “CSV → JSON” selected and “First row is a header” ticked. Each row becomes a JSON object whose keys are the column names.
My CSV uses semicolons. Will it work?
Yes. The delimiter is detected automatically from the first line, so semicolon files from European versions of Excel work. You can also choose the delimiter yourself.
How are quotes and commas inside fields handled?
Fields wrapped in double quotes can contain commas, line breaks and doubled quotes (“”), following the RFC 4180 CSV standard. “Lee, Min” stays one field.
What does “Convert numbers and true/false” do?
It turns values like 42, 3.14, true, false and null into JSON numbers, booleans and null instead of strings. Values with leading zeros, such as ZIP codes like 02134, stay as text so they aren’t changed.
How do I convert JSON to CSV?
Choose “JSON → CSV” and paste an array of objects. The columns are all keys found in any object, in order of first appearance. Nested objects are written as JSON text in the cell.
Is my data uploaded?
No. The conversion runs in your browser, so you can safely convert customer lists or financial exports.
Related tools
JSON Formatter
Pretty-print, validate and minify JSON with clear error positions.YAML to JSON Converter
YAML ↔ JSON for config files, with clear errors.Sort Lines
Alphabetize, sort by number or length, reverse or shuffle lines.Remove Duplicate Lines
Delete repeated lines from any list, with case and space options.Markdown to HTML
Markdown to HTML with tables and a safe live preview.
Last updated: