Skip to content
Toolcroft

JSON to CSV Converter

Developer Tools

Convert JSON arrays, objects, or JSONL to CSV in your browser. Open local files, flatten nested data, and export Excel-ready UTF-8 files.

Presets

Paste JSON or open/drop a local .json, .jsonl, .ndjson, or .txt file. Files are read in this browser.

How to use this tool

  1. Paste JSON or open a local file. Paste an array of objects, one object, or JSONL/NDJSON. You can also open or drop a local JSON file, or click "Load sample".
  2. Configure CSV options. Choose a delimiter and line ending, set the header and quote options, flatten nested objects, or choose a CSV preset.
  3. Copy or download the CSV output. The CSV is generated in real time. Copy it without a BOM or download it with an optional UTF-8 BOM for Excel.

When would you convert JSON to CSV?

JSON is common in API responses, application logs, and data exports. A spreadsheet or business intelligence workflow may need the same records in a flat table, where each row is one item and each column is a field. This converter runs in your browser and produces plain CSV text that you can paste into another tool or download for Excel, Google Sheets, a database import, or a data pipeline.

Input formats and rows

You can paste an array of objects, a single object, or newline-delimited JSON (JSONL or NDJSON). Each object becomes one output row. For an array, the converter collects the union of keys in the order they first appear; a missing key leaves an empty cell. If some NDJSON lines are malformed, valid object records are still converted and the skipped line numbers are reported.

[
  {"name": "Alice", "age": 30},
  {"name": "Bob",   "age": 25}
]

Array entries must be objects to become rows. Primitive values and nested arrays at the top level are skipped with a warning. Pretty-printed JSON arrays and objects are supported; JSONL instead has one complete JSON value on each non-empty line.

Nested values and flattening

CSV has one value per cell. With Flatten nested objects turned off, a nested object or array is written as compact JSON text in one cell. PapaParse adds CSV quotes and escapes the embedded quotation marks, so a value such as {"city":"Oslo"} remains one cell instead of becoming [object Object] or a comma-joined list.

Turn flattening on to convert nested object keys into dot-notation columns such as customer.address.city. Arrays are still kept together as JSON text rather than expanding into a variable number of columns. The preview shows up to five rows and eight columns; the CSV output and downloaded file include the full converted data.

Choose a delimiter and line ending

Comma is the usual CSV delimiter, while tab, pipe, and semicolon are also available. In many European spreadsheet locales a semicolon is more convenient because commas are decimal separators. LF line endings are common on Unix systems; CRLF is used by Windows applications and is a familiar interchange format. The RFC 4180, Excel EU, and TSV presets apply common combinations of delimiter, line ending, header, and byte order mark options.

Excel and UTF-8 files

The Include UTF-8 BOM switch adds a byte order mark to the downloaded file to help Excel on Windows recognize accented characters, emoji, and other non-ASCII text. It does not change the output textarea or copied CSV. A BOM can confuse some command-line and database importers, so leave the switch off when a downstream parser expects plain UTF-8. The Excel EU preset turns it on along with semicolon delimiters and CRLF line endings.

Open local files and keep data private

Use Open file or drop a .json, .jsonl, .ndjson, or .txt file onto the input area. The browser reads the file locally; neither pasted text nor file contents are sent to a server. Files over 10 MB may make live conversion slower because parsing happens in the current tab. JSON numbers larger than JavaScript's safe integer range can lose precision during parsing, so represent long IDs as quoted strings in the source JSON when their exact digits matter.

Frequently asked questions

What JSON format is supported?

Paste a JSON array of objects, one JSON object, or newline-delimited JSON (JSONL/NDJSON). Each object becomes a row. Non-object entries in an array are skipped with a warning.

What does "Flatten nested objects" do?

When enabled, nested objects become dot-notation columns, such as user.name. Arrays stay in one cell as JSON text. With flattening off, nested objects and arrays are also encoded as JSON text instead of lossy JavaScript object strings.

What does Include UTF-8 BOM do?

It adds a UTF-8 byte order mark to the downloaded file, which can help Excel on Windows recognize non-ASCII text. The copied CSV stays BOM-free, and some data importers may prefer files without a BOM.

Can I open a local JSON file?

Yes. Open or drop a .json, .jsonl, .ndjson, or .txt file. The browser reads it locally; its contents are not uploaded.

What happens with missing keys in some rows?

All unique keys across all rows are used as CSV headers. Rows missing a key produce an empty cell for that column.

Which delimiters and line endings are available?

Comma (,), semicolon (;), tab, and pipe (|) are available, along with LF or CRLF line endings. The Excel EU preset selects semicolons, CRLF, and a UTF-8 BOM.

Is my data processed on a server?

No. Pasted text and selected files are processed in your browser and are not uploaded.

Browse all developer tools