Skip to content

JSON to CSV Converter

Convert JSON to CSV online from pasted data, local files, JSONL/NDJSON, or a public JSON URL. Nested objects flatten into columns, and wrapped API responses let you choose which array becomes the rows. Preview the result, select the columns you need, then download CSV or Excel XLSX. Local files stay in your browser.

Drop a JSON file here

or click to browse

JSON, JSONL, NDJSON or TXT · 100 MB maximum

How to convert JSON to CSV online

Add JSON by pasting it, opening a local file, or importing a browser-accessible public URL. The converter builds a tabular preview from ordinary JSON arrays, nested JSON, wrapped API responses, JSONL, and NDJSON before you export the result as CSV or, for supported datasets, Excel XLSX.

1. Add JSON

Paste JSON or JSON Lines, choose a supported local file, or enter a public HTTP or HTTPS JSON URL.

2. Review the rows

Inspect the preview. If the real records are inside a nested array, use Rows from to select that collection.

3. Export

Keep the columns you need, then download CSV, copy a smaller result, or create an XLSX workbook within the Excel export limits.

Simple JSON to CSV example

Each object becomes one row and its keys become CSV columns.

JSON

[{"name":"Alice","age":31},{"name":"Bob","age":28}]

CSV

name,age
Alice,31
Bob,28

What JSON can this converter handle?

JSON is often more complicated than a flat array of identical objects. The converter uses fixed, documented rules for common API responses, exports, logs, and nested datasets so you can see how each structure will become a table.

JSON inputConversion behavior
Array of objectsEach source object becomes one CSV row.
Single JSON objectThe object becomes one row unless a nested record array is selected with Rows from.
Wrapped API responseChoose the collection that contains the records, such as data, results, items, or response.items.
Nested objectsKeys flatten into dot-path columns such as address.city.
Arrays inside a recordValues expand horizontally into numbered columns so the parent object remains one row.
JSONL / NDJSONEach complete non-empty JSON value becomes one source record.
Objects with different keysFields are discovered across the complete collection. Missing values remain blank under the correct column.

Nested JSON and API responses

Choose which JSON array becomes the CSV rows

API responses frequently wrap the useful records in pagination, totals, cursors, status fields, or other metadata. A document may contain a results array with hundreds of records even though the root value itself is only one object.

When eligible arrays are found, the result workspace shows a Rows from selector instead of silently deciding which array you meant. Keep Entire document when the root object itself should remain the record, or choose a collection such as data, results, response.items, or payload.records.

Selecting a row source rebuilds the row count, discovered schema, preview, column selection, warnings, and exported data around that collection. Wrapper properties outside the selected array are not copied into every output row.

Convert a wrapped API response by selecting results

Choose results in Rows from. The count and nextPage values belong to the wrapper and are not duplicated into the selected records.

JSON

{"count":2,"nextPage":null,"results":[{"id":101,"name":"Alice"},{"id":102,"name":"Bob"}]}

CSV

id,name
101,Alice
102,Bob

Candidate row-source paths are discovered through nested object properties. The selector intentionally does not walk through individual array elements to search for deeper child arrays, which avoids ambiguous parent-child row expansion.

How nested JSON becomes CSV columns

There is no single universal way to represent hierarchical JSON in a flat CSV table. This converter uses one consistent rule: each active source object stays on one row, nested objects become path-based columns, and arrays inside that record spread across numbered columns.

One object, one row

Every object in the active record collection remains one output row. A child array does not automatically duplicate the parent into several rows.

Nested objects

Nested keys use dot notation. For example, {"address":{"city":"Paris"}} creates the column address.city.

Nested arrays

Array positions become padded, one-based columns such as roles__001, roles__002, and wallets__001.currency.

Complete schema

Fields are discovered across the complete record collection before the final table is built. A key that first appears later still receives its own correctly aligned column.

Missing values

Missing fields, null, empty arrays, and empty objects become blank cells instead of inserting JSON literals into the spreadsheet.

Collision-safe headers

Literal dots, backslashes, and reserved array index patterns are escaped so source keys remain distinct from generated nested or indexed columns.

Horizontal array columns work best when each object is one logical record and its child arrays are reasonably short. A very long child collection may be easier to analyse as a separate table, and the converter warns when nested data makes the result unusually wide.

JSON to CSV examples

Convert nested arrays without duplicating rows

Shorter arrays leave the remaining numbered columns blank while each parent object stays on one row.

JSON

[{"userId":1,"roles":["Admin","Developer","Editor"]},{"userId":2,"roles":["Guest"]}]

CSV

userId,roles__001,roles__002,roles__003
1,Admin,Developer,Editor
2,Guest,,

Convert nested arrays of objects

The array position remains part of the generated path before each child object key.

JSON

[{"orderId":"A-100","wallets":[{"currency":"USD","type":"fiat"},{"currency":"BTC","type":"crypto"}]}]

CSV

orderId,wallets__001.currency,wallets__001.type,wallets__002.currency,wallets__002.type
A-100,USD,fiat,BTC,crypto

Keep fields that appear in later JSON records

The shared header is discovered from the complete record collection rather than only the first object.

JSON

[{"id":1,"name":"Alice"},{"id":2,"email":"bob@example.com"}]

CSV

id,name,email
1,Alice,
2,,bob@example.com

Keep null and missing values as blank cells

Null and missing fields occupy the correct column without inserting literal JSON text.

JSON

[{"id":1,"note":null,"status":"open"},{"id":2,"status":"closed"}]

CSV

id,note,status
1,,open
2,,closed

Convert JSONL or NDJSON into one row per record

Fields introduced by later JSON Lines records are still included in the final schema.

JSON

{"id":1,"status":"open"}
{"id":2,"status":"closed","owner":"Sam"}

CSV

id,status,owner
1,open,
2,closed,Sam

Convert JSONL and NDJSON to CSV

JSON Lines, commonly called JSONL or NDJSON, stores one complete JSON value per line. It is widely used for logs, exports, database dumps, command-line pipelines, and record-oriented datasets.

Blank lines are ignored. Every other line must contain one complete valid JSON value; a JSON object or array cannot continue onto the next line.

Top-level arrays and JSON Lines can be decoded incrementally in the conversion worker. The on-page preview remains intentionally limited, while CSV and eligible XLSX exports use the complete converted dataset.

Preserve large IDs and protect spreadsheet exports

Integers beyond JavaScript's safe integer range are preserved from their original JSON tokens before normal numeric parsing can round them. This matters for long IDs and database values where every digit is significant.

Formula protection is enabled by default. Formula-like text is neutralized before CSV export so untrusted strings are less likely to be interpreted as formulas by spreadsheet software.

CSV itself has no cell types, so Excel or another spreadsheet can still auto-format long identifiers or strings with leading zeros. Use the spreadsheet's text import controls or XLSX when exact cell typing matters.

Convert JSON to Excel XLSX or download CSV

CSV is plain text and is usually the better export for large datasets, database imports, analytics tools, scripts, and data pipelines. The complete converted dataset is exported even when only part of it fits in the on-page preview.

Supported results can also be exported as an Excel .xlsx workbook with string, number, and boolean cells. Browser-side XLSX generation is limited to 25,000 rows, 500 selected columns, 500,000 cells, and 32,767 characters in an individual Excel cell.

Convert large JSON files without uploading them

Pasted JSON and local files are processed inside the current browser tab. They are not uploaded to Olivez, and conversion does not require an account or a paid export. Public URL imports are direct browser requests to the source website.

The hard input limit is 100 MB, but that figure is a validation ceiling rather than a promise that every 100 MB document will fit every device. Nesting, array lengths, discovered columns, long values, output size, browser architecture, and available memory all affect practical capacity.

Parsing and conversion run in a dedicated Web Worker instead of directly in the React interface thread. File data is read in chunks, and large CSV downloads can stream through the File System Access API where the browser supports it.

Conversion warns above 500 discovered columns, stops above 5,000 columns, and rejects nesting beyond 50 levels. URL import also depends on CORS, redirects, authentication rules, valid UTF-8, the response-size limit, and a 30-second timeout.

CSV quoting, escaping, and delimiters

Comma, tab, semicolon, and pipe delimiters are supported. Values are quoted when necessary so delimiters, quotation marks, or line breaks inside a value do not change the structure of the CSV file.

Cell containsCSV treatment
Active delimiterWrap the complete field in double quotes
Double quoteDouble the quote and wrap the field
Carriage return or line feedWrap the complete field in double quotes
None of the aboveWrite the value without additional quoting

Preserve commas and quotation marks inside a CSV cell

The value is quoted because it contains a comma, and the quotation marks inside the value are doubled according to CSV escaping rules.

JSON

[{"message":"He said \"Hello\", then left."}]

CSV

message
"He said ""Hello"", then left."

Troubleshoot JSON to CSV conversion

Wrong rows

If a wrapped API response becomes one wide row, check Rows from for the array that actually contains the records, such as data, results, or items.

Invalid JSON

Comments, trailing commas, single-quoted strings, JavaScript object literals, undefined, NaN, and Infinity are not valid strict JSON and are rejected.

Missing columns

Fields are discovered across the complete active record collection. If expected fields are absent, first confirm that the correct Rows from collection has been selected.

Very wide output

Long inner arrays expand into numbered columns. The converter warns above 500 discovered columns and stops above 5,000. A child collection that represents its own table may be easier to convert separately.

URL import fails

The remote server must allow browser CORS access, avoid unsupported credential requirements, return valid JSON within the size limit, and complete before the 30-second timeout.

Excel changes an ID

CSV has no cell types, so spreadsheet software can still auto-format long identifiers or leading-zero strings. Import those columns as text or use XLSX when exact cell typing matters.

JSON to CSV converter FAQ

Is this JSON to CSV converter free and available without signup?

Yes. You can paste JSON, convert local files, preview the table, choose columns, download CSV, copy smaller results, and create XLSX files within the stated limits without creating an account or unlocking a paid export.

How do I convert JSON to CSV?

Paste JSON, choose a .json, .jsonl, .ndjson, or JSON-containing .txt file, or enter a public JSON URL. Select Convert to CSV, choose a Rows from source if the records are wrapped inside an array, review the preview and columns, then download CSV or XLSX.

Can this converter handle nested JSON?

Yes. Nested objects flatten into dot-path columns, while arrays inside each source record expand horizontally into numbered columns. One source object remains one output row.

How do I convert an API response when the records are inside data, results, or items?

Use Rows from after conversion. When the top-level object contains eligible arrays, the selector can list paths such as data, results, response.items, or payload.records. Choose the array whose items should become the CSV rows.

Does selecting a nested row source copy wrapper metadata into every row?

No. If you select results, only the items inside results become source records. Sibling wrapper properties such as pagination counts, cursors, or request metadata are not duplicated into those rows.

How are JSON arrays converted to CSV?

A top-level array supplies the source records. Arrays nested inside an individual record expand horizontally into numbered columns such as roles__001, roles__002, and roles__003 instead of multiplying the parent into several rows.

What happens when JSON objects contain different fields?

The converter discovers fields across the complete record collection before finalizing the table. A field that first appears in a later object still receives its own column, while records that do not contain it receive a blank cell.

Can I convert JSONL and NDJSON to CSV?

Yes. Upload a .jsonl or .ndjson file or paste one complete JSON value per line. Blank lines are ignored, and malformed non-empty lines are reported instead of being silently skipped.

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

Yes. Pasted JSON and local files are processed in the current browser tab and are not uploaded to Olivez. Public URL imports are fetched directly by your browser from the source website and are not proxied through Olivez.

Can I convert a large JSON file up to 100 MB?

The hard input limit is 100 MB. Successful conversion still depends on the data structure, nesting, array lengths, number of discovered columns, output size, browser memory, device capability, and export format.

Can I convert JSON to Excel XLSX?

Yes. Supported converted datasets can be exported as an XLSX workbook. In-browser XLSX creation is limited to 25,000 rows, 500 selected columns, and 500,000 cells, so CSV remains the better export for larger results.

Why are large JSON integers preserved as text?

Integer tokens beyond JavaScript's safe integer range are preserved before ordinary number parsing can round their digits. CSV cannot control how spreadsheet software later formats those values, so long identifiers may still need to be imported as text.

What happens to null values and missing fields?

They become blank cells. Empty arrays and empty objects also produce blank cells rather than literal null, [], or {} text.

Why can importing a public JSON URL fail?

The remote server may block CORS requests, require authentication, redirect to a protected location, reject private-network access, return invalid JSON, exceed the 100 MB response limit, or take longer than the 30-second request limit.

Which CSV delimiter should I use?

Comma is the standard default. Tab, semicolon, and pipe are available when required by regional spreadsheet settings, database imports, or another destination system.

Technical references

These specifications and browser references cover JSON syntax, CSV escaping, JSON Lines, spreadsheet formula risks, Excel limits, text decoding, worker processing, and browser-side file downloads used by the converter.