Skip to content
FPSDEN

JSON to CSV Converter

Paste JSON or CSV on the left, pick the direction with the tab, and read the converted text on the right. Everything runs in this browser tab.

Converter workspace

Converted output

Type or paste into the input box, or drop a .json, .csv or .tsv file onto it. The output updates as you type; the Convert button re-runs the same conversion after a change.

Conversion options

Ready: the sample text is loaded. Replace it with your own data.

Drag a file here or onto the input box to load it. Nothing is uploaded: the file is read in this browser tab.

Column map of the current inputidnamecitytags3 records, 4 columns

One block per column the converter found, in first-seen order; the label under the map reports how many records were read.

Rules used here: JSON must be an array of objects, one object, or an object whose first array-valued property holds the records; nested objects become dot paths while arrays stay JSON text; CSV follows RFC 4180 with CRLF rows, quoted fields and doubled inner quotes, and a leading BOM is ignored on read.

How this JSON to CSV converter works

The converter reads the text in the input box, builds a column list from the keys it finds, and writes the rows out with the delimiter you choose. The tab above the tool picks the direction: JSON to CSV turns an array of records into a table, while CSV to JSON turns the first row of a table into the property names of each record. The output pane and the column map below the form update on every keystroke, so you can see the column order before you copy anything.

Which JSON shapes are accepted

Three shapes convert without extra editing. An array of objects gives one row per object. A single object gives one row. An object such as {"data": [ ... ]} gives one row per element of its first array-valued property, which is the usual shape of an API response. Objects nested inside a record become dot paths, so {"address":{"city":"London"}} produces the column address.city. Arrays and any other nested value stay in one cell as JSON text, because a CSV cell holds a single value.

Column order and missing values

Columns appear in first-seen order: the keys of the first record, then any new key from later records. A record that does not carry every key leaves an empty cell rather than shifting the row, so the column count stays stable across the file. If two records use different spellings of the same field, they stay two columns; fix the source data or rename the keys before converting.

CSV options that matter for Excel

Excel opens a plain UTF-8 CSV as ANSI on many Windows installations, which mangles accented letters. Turning on the BOM option writes the byte order mark in front of the file so Excel detects UTF-8 and reads the text correctly. The delimiter list covers the comma, the semicolon used by many European locales, and the tab used by .tsv exports; the automatic option counts separators in the first line and picks the most common one. Quoting follows RFC 4180: a cell is wrapped in double quotes when it contains the delimiter, a quote, or a line break, and inner quotes are doubled.

A JSON to CSV example

The sample in the input box holds three records with the keys id, name, city and tags. The converted table starts with the header id,name,city,tags, then one line per record. The tags values are arrays, so they are written as JSON text inside a quoted cell: "[""math"",""notes""]". A reader that expects a single value per cell sees the array as text, which is the same trade-off every flat-file converter makes when the source is nested.

CSV to JSON in the same window

Switching to the CSV to JSON tab keeps the same two panes and reverses the direction: the first row becomes the property names, every later row becomes an object, and the result is pretty-printed JSON. Cells stay text by default, which keeps leading zeros and long identifiers intact. Turn on the type option when the values are plain numbers or booleans and you want them typed in the JSON output; a value is only converted when it survives the round trip exactly, so 007 and 3.50 stay text while 42 becomes a number.

Limits, privacy and files

Conversion runs in the browser with JavaScript and no request is sent to a server, so the data stays on this device. Very large inputs are capped at 5000 records to keep the page responsive; split bigger exports and convert them in parts. The file picker and the drop area read the chosen file as text in the page, and the download button writes the result back out as converted.csv or converted.json.

Counting words in the document you paste this data into? See how to check word count in Google Docs.

Frequently asked questions

How do I convert JSON to CSV online?

Paste the JSON into the input box and the converter writes the CSV immediately, or press Convert to re-run the conversion. The header line lists the keys in first-seen order and each record becomes one line. Copy the output with the copy button or download it as a .csv file.

Can I convert a JSON file to CSV without uploading it?

Yes. Choose a file with the file button or drop it onto the input box and the browser reads it as text in this tab. No upload request is made, so the file contents never leave the device.

What is the difference between JSON and CSV?

JSON stores named values and can nest them, so one record may contain objects and arrays. CSV stores a flat table of rows and columns, so every record must carry the same columns and each cell holds one value. Converting JSON to CSV therefore flattens nested objects into dot-path column names and writes arrays as text.

Does the CSV export open correctly in Excel?

It does when the BOM option is on. Excel on Windows often assumes ANSI encoding for a plain UTF-8 file, which turns accented characters into symbols; the byte order mark in front of the file tells Excel to read it as UTF-8. Rows use CRLF line endings and quoted cells follow RFC 4180, which Excel accepts.

How do I convert CSV to JSON?

Switch to the CSV to JSON tab, or open the standalone CSV to JSON page on this site. The first row of the table becomes the property names and each later row becomes an object with those keys. Values stay text unless the type option is on.

Can I convert nested JSON objects?

Nested objects are flattened to dot paths such as address.city, and arrays are written as JSON text inside a single cell. If you need the nesting preserved, convert in the other direction instead: CSV to JSON produces a flat array of objects, which you can then restructure in your own code.

How many rows can the converter handle?

The tool converts up to 5000 records per run and reports an error above that limit. For larger exports, split the file and convert it in parts, because the browser has to hold the whole text in memory.

Where can I count the words in a report I built from this data?

If you paste the converted table into a document and need a word count, the Google Docs word count guide on this site walks through the Tools menu, the keyboard shortcut and the live counter. The converter itself reports records and columns rather than words.