Skip to main content

JSON to CSV converter

Convert JSON data to CSV format

No watermarkFree & unlimited
Mode
Input (JSON)
Output (CSV)
All processing happens in your browser. No data is sent to any server.

An array of objects maps onto a table cleanly, and that is the case this converter is built for. Each object becomes a row, the keys of the first object become the header, and Papa Parse writes the result with proper quoting. Values that are themselves objects or arrays cannot occupy a cell, so they are re-serialised as compact JSON text rather than collapsing into the useless string that naive converters produce. A single object rather than an array is accepted too and comes out as a one-row table.

Key facts about JSON to CSV converter

Key facts about JSON to CSV converter
WriterPapa Parse 5.5 unparse, which applies RFC 4180 quoting and writes carriage return plus line feed endings.
Accepted inputAn array of objects, or a single object, which is wrapped into a one-row table automatically.
Header rowTaken from the keys of the first object, so a key that appears only in later records is not written out.
Nested valuesObjects and arrays inside a record are stringified back to compact JSON and stored as text in that cell.
NullsWritten as an empty field, which a spreadsheet then shows as an empty cell rather than the word null.
QuotingApplied only where needed, for values containing a comma, a quote or a line break, with quotes doubled inside.
DelimiterComma. There is no option for semicolon or tab output, so a European spreadsheet may need an import step.
EncodingUTF-8 with no byte order mark, which is why Excel can garble accented characters on a double-click open.
Invalid inputParsing is strict. A trailing comma or an unquoted key stops the conversion with the JSON error message.
Key orderColumns follow the key order of the first object, so the CSV reads in the same order as your JSON.
ModesPaste and convert for quick work, or file upload for a .json file, with copy and download on the output.
Opens natively inExcel, Numbers, Google Sheets, LibreOffice Calc, pandas, R, and every database bulk import tool.

What happens to your file

The conversion is entirely local. Pasted JSON stays in the input panel, and an uploaded .json file is read with the File API and parsed with the browser own JSON parser. The flattening step and Papa Parse both run as JavaScript in this tab, and the result is offered as clipboard text or as a Blob download. No copy of your data is transmitted, stored or logged anywhere, which matters because JSON exports frequently contain identifiers, addresses and other personal fields.

About this tool

  1. 1

    Pick paste or upload

    Paste and convert opens by default; switch to file upload when the JSON is too large to paste.

  2. 2

    Provide the JSON

    Supply an array of objects, or a single object. Arrays of plain values are not table-shaped and convert poorly.

  3. 3

    Convert

    Records are flattened one level, then Papa Parse writes the header row and the quoted data rows.

  4. 4

    Review the columns

    Check that every column you expected is present, since the header comes from the first record alone.

  5. 5

    Copy or download

    Copy the CSV to the clipboard, or save a .csv file when you converted from an uploaded document.

Specs & compatibility
Input and outputTakes .json (application/json) and returns the CSV as a blob with the text/csv type, named after the file you dropped in.
EngineJSON.parse reads the file and Papa Parse 5.5.3, bundled into the page, unparses the rows into CSV - no worker, no WebAssembly, no download.
ModesBoth modes: paste the JSON in and copy the CSV straight back out, or hand over a file and take the CSV as a download.
Batch and capsTwenty JSON files per run at 500 MB each; several CSV results are zipped in page memory as converted-csv-files.zip.
Browser and deviceJSON to CSV needs only the File API, a Blob download and the parser already in the bundle, so every current browser behaves the same and the page keeps working with the network off.
  • Make sure the first object carries every key you want as a column. If your records vary, sort a complete one to the front or fill in the missing keys with nulls first.
  • Nested objects survive as JSON text in the cell, which keeps the information but is awkward in a spreadsheet. Flatten the structure in code first if you need real columns.
  • Opening the file in Excel by double-clicking can mangle accents, because no byte order mark is written. Use the text import wizard and pick UTF-8, or add a mark in a text editor.
  • Watch for values that a spreadsheet will reinterpret, such as long numbers, dates and anything starting with a plus or an equals sign.
  • For quick checks, convert a short slice first in paste mode. The output character count tells you immediately whether the shape is what you expected.
  • Hand an API response to a colleague who works in Excel or Google Sheets and does not want to read JSON.
  • Prepare a bulk import file for a CRM, a mailing platform or a database loader that only accepts delimited text.
  • Get a quick tabular view of a log or export so it can be sorted, filtered and pivoted in a spreadsheet.
The header row is derived from the keys of the first object in the array, so any key that appears only in later records has no column to be written into. This is the standard behaviour of the unparse step rather than a check on your data. Reorder the array so a complete record comes first, or normalise the objects so that every one carries the same set of keys.
Before the table is written, each value that is itself an object or an array is converted back into compact JSON text and placed in the cell as a string. That keeps the information rather than writing the unhelpful object placeholder that naive converters emit, but it does mean a nested address or a list of tags arrives as a JSON snippet, which you may want to split in the spreadsheet afterwards.
Not from this page; the delimiter is fixed at comma, which is the format most tools expect. If your spreadsheet locale uses semicolons, import the file through the text import dialog and tell it the separator, or run a careful find-and-replace that respects quoted fields. Changing the delimiter blindly in a text editor will break any value that contains a comma.
The file is UTF-8 without a byte order mark, and Excel on Windows assumes the legacy system code page when it opens a .csv by double-click. Accented and non-Latin characters are then misread. Import the file through Data and From Text instead, choosing UTF-8, or add a byte order mark at the start of the file with a text editor that can do so.
Parsing is strict, so the input must be valid JSON rather than a JavaScript object literal. Trailing commas, unquoted keys, single-quoted strings and comments are all rejected, and the error message shown is the one the browser parser produced. Run the text through a JSON formatter first to find the offending position, then convert the corrected document.
A single object is accepted and becomes a one-row table, because the converter wraps anything that is not already an array before the flattening step. Where this pair does not fit well is an array of plain values such as strings or numbers, since those records have no keys to become column names and the result is a single unnamed column.
View all

Need the opposite? Try CSV to JSON

Updated

We use anonymous analytics to improve ToolChamp. No personal data is stored or sold. Privacy Policy