Guides

Every conversion between JSON and a spreadsheet format has to make the same three decisions: what counts as a row, what counts as a column, and what happens when two rows disagree. These guides take one format pair at a time, show the mapping with real input and real output, and cover the places where a file that is technically correct still ends up wrong on your screen.

Path markers

JSON to CSV: Distinguish Array Index [0] From Literal Key "[0]" in Column Headers

Declare JSON Pointer path, path kind and segment type columns when a literal object key "[0]" and a sibling array index 0 produce colliding dot-path headers.

Sign tokens

JSON to CSV: Distinguish Leading Plus +42, Unsigned 42, and String "+42"

Declare kind, sign marker, value type, source token and JSON columns when a field is the number 42 in one record, the string "+42" in the next, and the string "42" in a third.

Numeric tokens

JSON to CSV: Distinguish Positive/Negative and Scientific Notation Tokens

Declare sign, notation, source token and JSON columns when a field is 42 in one record, -17 in the next, and 1e3 in a third.

Numeric types

JSON to CSV: Distinguish Integer and Float Number Columns

Declare kind, JSON type, value and JSON columns when a field is the integer 42 in one record and the float 3.14 in the next.

Falsy values

JSON to CSV: Distinguish Number 0, Boolean false, and String "0"

Declare kind, JSON type, value and JSON columns when a field is the number 0 in one record, the boolean false in the next, and the string "0" in a third.

Boolean types

JSON to CSV: Distinguish Boolean true/false From String "true"/"false"

Declare kind, JSON type, value and JSON columns when a field is the boolean true in one record and the string "true" in the next.

Array emptiness

JSON to CSV: Distinguish Empty Array [] From [null] in Every Row

Declare state, element count, null count and JSON columns when a field is [] in one record and [null] in the next.

Empty-value policy

JSON to CSV: Distinguish null From Empty Object {} in Every Row

Declare state, key count and JSON columns when a field is null in one record and {} in the next.

Union types

JSON to CSV: Export Union-Type String and Array Fields Without Losing Shape

Declare kind, count, value and json columns when a field is a string in one record and an array in the next.

Mixed types

JSON to CSV: Handle Mixed Object and Scalar Array Elements

Classify each element before writing so bare scalars do not create phantom columns.

Column collection

JSON to CSV: Keep __proto__, constructor and prototype as Literal Columns

Keep prototype-named own fields as literal CSV headers.

Parse diagnostics

JSON to CSV Error Positions: Character Index or UTF-8 Byte Offset?

Map parser character positions to unchanged UTF-8 source bytes.

Unicode preflight

JSON to CSV: Find Unpaired Surrogates Before UTF-8 Output

Report unpaired surrogate values before creating UTF-8 CSV.

Handoff policy

NUL in JSON to CSV: Reject the Handoff, Do Not Delete the Character

Locate decoded NUL without silently deleting source characters.

Archive members

JSON in a ZIP to CSV: Select One Exact Member, Reject Duplicate Names

Select the exact JSON member and refuse ambiguous duplicate names.

Source decoding

UTF-16 JSON to UTF-8 CSV: Declare Byte Order, Preserve Field Characters

Declare source byte order and preserve actual field characters.

Input envelopes

Double-Encoded JSON to CSV: Decode One Envelope, Keep Field Text

Decode a declared document envelope without changing JSON-looking field text.

Input validity

NaN in JSON to CSV: Reject Bare Constants, Keep Quoted Text

Reject bare nonstandard constants without changing valid string labels.

Export handoff

JSON to CSV: Keep Your Existing Export When Conversion Fails

Stage and verify a replacement before committing it over an existing CSV.

Source provenance

JSON to CSV: Preserve Values, Keep Original Escape Spellings Separately

Keep original JSON bytes separately from decoded CSV values, with a reproducible file receipt.

Explicit schema

JSON to CSV: Keep Columns Aligned When Object Keys Change Order

Reproduce a precise local export with original input and saved output.

Explicit schema

Empty JSON Array to CSV: Keep the Header, Write No Data Row

Reproduce a precise local export with original input and saved output.

Field whitespace

JSON to CSV: Preserve Leading Spaces, Trailing Spaces and Tabs

Audit invisible characters before deciding whether text changed.

Semicolon CSV

JSON to Semicolon CSV: Preserve Commas, Semicolons and Quotes

Change the separator without changing punctuation inside fields.

Repeated records

JSON to CSV: Preserve Repeated Records and Check Every Occurrence

Preserve occurrences and catch losses hidden by set comparisons.

UTF-8 signature

JSON to CSV: Remove an Initial UTF-8 BOM, Preserve Field Content

Skip an initial prefix without deleting characters inside fields.

Container depth

JSON to CSV: Check Container Nesting Depth Before Parsing

Count containers outside strings and validate before creating CSV.

Gzip input

Gzipped JSON to CSV: Limit Decompressed Bytes Before Parsing

Cap expanded bytes and reject corrupt input before opening CSV.

Unicode strings

JSON to CSV: Preserve Unicode Strings Before Choosing Normalization

Preserve code points and audit NFC matching collisions.

String line breaks

JSON to CSV: Preserve Actual Line Breaks and Literal Backslash-n

Keep LF, CRLF and literal backslash-n distinct through CSV.

Supplied headers

JSON Array of Arrays to CSV: Supply a Header and Reject Ragged Rows

Reject ragged rows and reconstruct the declared string matrix.

Object maps

JSON Object Map to CSV: Preserve the Keys as Record IDs

Keep dynamic keys as row IDs and verify the reconstructed map.

Timestamp strings

JSON to CSV: Preserve ISO 8601 Offsets and Add a UTC Column

Preserve offsets, derive UTC separately, and flag unresolved times.

JSON syntax

JSON to CSV: Fix Comments and Trailing Commas Without Damaging Strings

Review a separate valid copy while preserving URLs and literal comment-like text.

Decimal tokens

JSON to CSV: Preserve Decimal Digits, Exponents and Trailing Zeros

Keep source digits and notation before float parsing changes them.

Column paths

JSON to CSV: Prevent Flattened Column Name Collisions

Separate dotted keys from nested paths with unique headers and a downloadable map.

Scalar arrays

JSON Primitive Array to CSV: Keep Index, Type and Value

One row per value, with explicit order and types and a reconstruction check.

Duplicate keys

JSON to CSV: Detect Duplicate Keys Before Values Are Overwritten

Catch repeated and escaped names before parsing hides a value.

Timestamp units

JSON Epoch Timestamps to CSV: Seconds, Milliseconds and UTC

Keep raw values, derive explicit UTC dates and retain unresolved units in a four-record example.

Large files

JSON File Too Large to Convert? Size Limits, Options, and What It Used to Cost

Choose valid record batches or a streaming export; review historical conversion options.

Spreadsheet review

Separate Raw CSV and Review Copies

Inspect formula-like text and retain a ledger of deliberately changed cells.

Large files

Stream Large JSON and Keep Every Column

Discover late fields, export one record at a time, and require a completed manifest.

API pagination

Export Every API Page to CSV

Follow the saved next-page chain, detect duplicate IDs and inspect a downloadable export manifest.

JSONL recovery

Convert JSONL to CSV Without Silently Losing Bad Lines

Separate accepted records from rejected lines, retain source line numbers and reconcile both outputs.

Identifier precision

Preserve Long JSON IDs Through CSV and Excel

Find the boundary that changes long IDs and preserve exact digits through spreadsheet import.

Field meaning

Keep Missing, Null and Empty JSON Fields Distinct in CSV

Try an original state-column sample that preserves the meaning of empty-looking fields.

Data verification

Verify Every Row and Field After JSON to CSV Conversion

Audit a three-record export for missing rows, late columns, shifted fields, and changed strings with a downloadable checker.

Spreadsheet import

Keep Leading Zeros When JSON Becomes CSV and Excel

Find out whether zeros disappeared in the CSV export or during Excel import, then preserve ID columns as text with a two-row check.

JSON to CSV

How to Convert a JSON to CSV

Three steps, the two settings that decide what your file looks like, and the exact output for 24 input shapes — including the nested objects and arrays that do not map the way people expect, and the Excel import that stops leading zeros and long IDs being mangled.

Python

JSON to CSV Python: 4 Methods, Measured

pandas, json_normalize, or the csv module — the literal bytes each method writes for the same 25 input shapes, the four values they change on the way through, and the standard-library recipe that matches a browser converter exactly.

File handling

Convert a JSON File to CSV: 7 Sizes and 12 File Shapes, Measured

Seven files from 1 MB to 200 MB and twelve real file shapes — UTF-8 BOM, UTF-16, Latin-1, CRLF, .jsonl — with the read time, convert time and CSV byte count for each, plus the file size at which the browser tab stops surviving the conversion.

Nested data

Split Nested JSON into Related CSV Files

Use an orders-and-items example to decide when to create a parent CSV and a child CSV, preserve the join key, validate row counts, and avoid summing duplicated parent totals.

Converters