BROWSER-BASED TABLE TOOL

Nested JSON to CSV and Related Tables

Convert nested JSON or JSONL into CSV tables. Choose the record path, split arrays into related tables, and preserve long IDs. Processing stays local.

File contents are processed locally in your browser. Refreshing or closing clears the session. The website still requests static resources.

1 · Raw JSON→2 · Structure and relations→3 · Review tables

Local UTF-8 text only, up to 10 MB. No API connections or automatic visits to links in data.

pasted.json · Raw text and format

JSONL requires one complete value per nonempty physical line. Blank lines are tolerated and counted; invalid lines cannot be skipped. Switching formats does not repair input.

Synthetic examples · Normal / Boundary / Error
Page memory only · UTF-8 · Complete structure scan · Refreshing or closing clears data

Turn nested records into tables that keep their relationships

A nested JSON response can describe several kinds of records at once. An order has customer details, an array of purchased items and another array of payments. These collections do not have the same meaning. Flattening everything into one table can accidentally pair every item with every payment. Two items and two payments then become four combinations, and a later sum can count each item twice. This tool makes the record collection and each array policy explicit before producing a table.

The orders example contains two orders. The first has two items and two payments; the second has empty arrays. Select orders as the main record path and set the two arrays to independent child tables. The result is two order rows, two item rows and two payment rows. Each child refers to its actual parent through a generated ID. The empty order remains in the main table and has no invented item or payment. Separate tables preserve the relationship without asserting a relationship between individual items and payments.

Read local JSON or JSONL and inspect the full structure

Choose a local UTF-8 JSON or JSONL file, or paste the original text. A JSON document must have an object or array at its root. JSONL uses one complete value on each nonempty physical line. A formatted document spread across many lines is not a sequence of valid JSONL records. This workbench tolerates and counts blank lines, although blank lines are not valid JSON Lines records in the format specification. Any malformed nonempty line blocks delivery; it is never silently skipped.

Inspect complete structure parses the entire input before displaying the field tree. Searching or paging the tree changes only what you see. A field first encountered after the first fifty records is still discovered. The overview reports bytes, root records, nodes, field paths and nesting depth. Values shown beside paths are examples, not a claim that every record has that value or type. A tree field can have several observed types, including null.

Repeated object keys are rejected after JSON string escapes are decoded. A key spelled with a Unicode escape therefore cannot quietly replace an equivalent key. The error includes its path and position. Invalid escapes, incomplete values and lone surrogate characters also require correction. The parser retains numeric tokens before any ordinary JavaScript number conversion. The integer 9007199254740993 remains that exact sequence, and 1.2300 remains 1.2300. A quoted code such as 00123 keeps its leading zeros.

Choose one main collection and deliberate parent metadata

The main record path identifies the collection you want to work on. Selecting the root object creates one main record; selecting an array creates one record per element. An array nested under repeated parent records collects those elements across their parents. Choosing items as the sole main record path produces item records only. An order with no items then contributes no main rows. If retaining every order matters, keep orders as the main collection and create an item child table instead.

Parent metadata lets you carry an ancestor value, such as a batch label or order number, into the selected child records. Search the field tree to locate a path, then choose it under parent metadata. Metadata must come from the actual ancestor context. The tool rejects a request to take the payment at the same numeric index as an item, because equal array positions do not establish a business relationship. Missing ancestor values remain missing and appear in the state report.

Paths use typed segments rather than a single dotted string. A literal key named customer.name is distinct from a customer object with a name field. The displayed tree uses bracket notation; the mapping report stores the segment array. Default column names may use dots for readability, but collisions receive suffixes and preserve their separate mappings. You can rename selected fields. Explicit duplicate names are blocked so that a manual edit cannot silently overwrite another output column.

Assign array policies without multiplying peer collections

Every discovered array starts as serialized JSON text in one cell. Change it to an independent child table, or use it as the sole main record path. The independent-table action is useful for orders with both items and payments. It does not join the two arrays. Deep arrays can become further child tables when their containing array is also a child table. An array inside a serialized parent remains inside that text; change the ancestor policy first if you need a deeper related table.

Each output table includes record_id, parent_id, item_order and source_path. IDs are stable within the unchanged page session and are based on a random task namespace and parsed node position, not a private order number. Child parent_id values point to the immediate parent table, including at deeper levels. Item order starts at one within the original collection. source_path identifies the specific original node, and physical source lines remain available in record provenance.

Empty arrays create zero child records. Missing arrays and null arrays also create no child records, with their distinct states recorded. If a field designated as a child array contains a non-array value elsewhere, delivery is blocked until you correct the source or choose text mode. Mixed scalar and object fields can either preserve their values or block and report. Objects are serialized as JSON, never converted to a generic object label. This policy does not manufacture a schema that the source did not have.

Review table counts, missing states and omitted fields

The sample preview shows up to twenty rows per table after a complete scan and calculation. Its projected counts describe the complete result, but the sample itself cannot be downloaded or sent to another tool. Generate complete tables before delivery. The overview lists each table, record path, row count, column count and parent relationship. Main and child tabs show the actual records; report tabs explain the choices and exceptions.

CSV has fewer types than JSON. A missing field and a JSON null may both become an empty CSV cell. An empty string, empty object and empty array have different source meanings as well. Keep the field-type and state reports if those distinctions matter downstream. Numeric text is preserved in the file, but a spreadsheet application can still coerce it when opening the CSV. Choose text import settings in that application for identifiers and exact numeric tokens.

The omitted-fields report lists fields outside the selected record scope or not selected for output. Fields inside an exported serialized object are already represented by that container. Review omissions before assuming you have converted the entire response. Rule edits, source edits and undo operations mark existing results stale. Saving rules stores paths, type expectations, names and policies, not the original data. Reloaded rules must match the discovered structure, and require generation again.

Verify exports and continue a local workflow

Choose one table or a ZIP containing every table and report. The export summary confirms the selected scope; searching a preview does not restrict the download. CSV and TSV files are parsed back before download. ZIP verification also checks that each child parent ID exists in its parent file. Raw JSON is never included by default. Spreadsheet formula protection can add an apostrophe to formula-like strings; inspect its affected count and explicitly acknowledge the raw option when you need unchanged text.

Continue from the item table to calculate price times quantity, group by parent_id, then join that summary to order record_id. Other generated tables remain available as lookup inputs. All processing occurs in a cancellable browser worker. Input stays in page memory and is cleared by refreshing or closing. No remote API, credential, pagination endpoint or data URL is contacted. The website still loads its own static assets.

The current limits are 10 MB of UTF-8 input, depth 64, 500000 parsed nodes, 5000 discovered paths, 20 output tables and eight child-table levels. Output is limited to 100000 total records, 200 columns per table including metadata, and 2000000 cells. Strings have a 100000-character limit and numeric tokens may contain at most 1000 digits. Oversized input is rejected rather than truncated. A task times out after thirty seconds. These bounds protect a local browser session; they are not claims about every device having identical performance.

Frequently asked questions

How do I turn a nested API response into a CSV table?

Save the response as JSON or paste its raw text, inspect the structure, and choose the collection that represents your records. For example, choose orders if you need one row per order. Review the fields before generating tables. The tool does not call the API or retrieve data from links in the response.

Should I flatten arrays into rows or export separate tables?

Choose an array as the main record path when you only need its elements. If you also need the parent records, export the array as a child table with a parent reference. Arrays that are only background information can remain serialized text. This choice determines what one row means.

Why do multiple arrays sometimes create too many CSV rows?

Expanding independent arrays together can create every combination of their elements. Two items and three payments can become six rows even though there are only two items. This tool keeps those arrays in separate related tables, so you can summarize and join them deliberately.

Will an order disappear if its items array is empty?

No, if orders is the main record path. The order stays in the main table and has no item rows in its child table. If you choose items as the sole main path, you are requesting item records only, so an order without items contributes no main rows.

Will large numbers and leading-zero IDs keep their exact values?

The JSON reader preserves numeric text without first converting it to a JavaScript number. String identifiers such as 00123 stay text. After download, a spreadsheet can still reinterpret CSV cells; import identifiers as text. Keep the type and state reports when those distinctions matter.

Can I convert JSONL as well as a regular JSON file?

Yes. Select the matching input format. JSONL uses one complete JSON value per nonblank physical line; a pretty-printed JSON document may span many lines and should use JSON mode. Blank lines are counted as an explicit tolerance. Invalid records block conversion rather than being silently skipped.

Does a CSV preserve the difference between null and a missing field?

A CSV alone does not preserve every JSON type or missing-state distinction. Download the accompanying field and state reports to distinguish null, a missing field, an empty string, and an empty array. Retain the original JSON if you need to reconstruct the original document.

How do I check what was left out of the export?

Review the omitted-fields tab for paths and types outside the selected output. The all-tables ZIP includes this report, the relationship map, and other review reports. Check both the table counts and those reports before treating the conversion as complete.