JSON Converter
Turn JSON or JSON Lines into clean tables and handoff files with record-path selection, flattening controls, and precision warnings.Latest conversion
| # | {{ header }} | Copy |
|---|---|---|
| {{ row.rowNumber }} | {{ cell }} | |
| No rows available. |
| Path | Types | Coverage | Example | Copy |
|---|---|---|---|---|
| {{ row.path }} | {{ row.types }} | {{ row.coverage }} | {{ row.example }} | |
| Path atlas appears after a successful transform. | ||||
| Risk area | Status | Evidence | Copy |
|---|---|---|---|
| {{ risk.category }} | {{ risk.status }} | {{ risk.detail }} |
{{ deckText }}
JSON is a good interchange format because it keeps structure close to the data. Objects carry named fields, arrays preserve order, strings keep exact text, and nested values can represent a full API response without forcing everything into rows and columns. That same flexibility makes JSON harder to audit when the next job is a spreadsheet review, a database import, a report table, or a quick comparison between two exports.
Most conversion mistakes start before the output format is chosen. A payload may contain the real records at the root, one object per line, or a wrapper object such as {"meta": {...}, "items": [...]}. Selecting the wrong branch can produce a tidy table that is still the wrong table. The record count, selected path, sparse fields, and depth often reveal more about conversion quality than the file extension alone.
JSON Lines, also called newline-delimited JSON, is a neighboring format rather than just messy JSON with line breaks. Each non-empty line is its own complete JSON value, which fits logs, event streams, and batch exports. Treating JSON Lines as one ordinary JSON document usually fails, while treating an ordinary formatted JSON array as JSON Lines can change error messages and record counting.
Flattening deserves the same care as parsing. Turning owner.name or labels[0] into a column makes a table easier to scan, but it also replaces tree structure with header names. Keeping nested values as JSON cell text can be safer when arrays have variable length, when objects differ widely from row to row, or when the receiving system expects a nested value rather than many expanded columns.
| Choice | Good fit | Common failure |
|---|---|---|
| Root data | A top-level array or single record object. | Wrapper metadata becomes part of the table. |
| Record path | API responses where records sit under a branch such as items. | A typo falls back to the wrong level unless the warning is checked. |
| Object flattening | Stable nested objects with predictable keys. | Very deep keys create wide, hard-to-read headers. |
| Array flattening | Short arrays where positions have consistent meaning. | Variable-length arrays create sparse positional columns. |
A clean-looking output is not proof that the conversion is safe to hand off. Large numeric identifiers can lose exactness when parsed as numbers, blank cells can mean missing fields or intentional nulls, and a wide table can hide how uneven the source records really are. Good conversion keeps the hierarchy visible long enough to check those risks before the data is flattened, copied, or downloaded.
How to Use This Tool:
Start by making the source shape and record branch explicit, then choose the output that matches the next system.
- Paste data into Payload, or browse/drop a
.json,.jsonl, or.txtfile. If the text is empty or invalid, an error appears above the input instead of producing stale results. - Set Mode. Auto detect tries normal JSON first and JSON Lines second; Strict JSON and Strict JSONL are better when you need a failure to point at the wrong source shape.
- Use Record path when records are nested inside a wrapper. Dot/bracket paths such as
items[0].recordsand JSON Pointer paths such as/items/0/recordscan select the branch that should feed the table. - Choose Output format for the selected-format preview. The parsed branch can be previewed as JSON Lines, CSV, TSV, XML, YAML, an HTML table, a Markdown table, or SQL insert text.
- Set Flatten objects and Flatten arrays before reviewing the table. These switches decide whether nested values become path-style headers or remain JSON text inside cells.
- Open Advanced when the destination has naming or formatting expectations. Indent size, key sorting, null handling, header case, SQL dialect, table name, XML tags, and preview row limits all affect the handoff shape.
- Check Latest conversion, then review Record Grid, Path Atlas, Risk Audit, and JSON. If a path warning appears, fix the path or clear it before copying or downloading output.
The on-page grid can be limited with Preview rows so the browser stays responsive, but the generated downloads use the full selected dataset.
Interpreting Results:
Latest conversion is the first sanity check. Record count, root type, target type, field count, depth, payload size, JSON Lines count, selected path, and unsafe-integer badges tell you whether the parser found the kind of data you expected.
Record Grid is useful for row-by-row review, but it is a flattened view. Use JSON to confirm the selected branch before flattening, and use Path Atlas to see which paths became fields, which value types appeared, how much coverage each field has, and a sample value.
Risk Audit does not declare the data wrong. It highlights conditions that often break handoffs: unresolved paths, integer values outside the safe exact range for browser numbers, very broad header sets, and unusually deep payloads.
- Trust the conversion only after the record count and selected branch match the source you meant to convert.
- Review sparse fields in Path Atlas before treating blank cells as missing, null, or intentionally empty.
- Treat large numeric identifiers as text when exact digits matter, especially before spreadsheet or SQL handoff.
Technical Details:
JSON represents data as strings, numbers, booleans, null, arrays, and objects. Objects preserve named members, arrays preserve order, and nested combinations of both create the tree structure that makes JSON expressive. A tabular export has to flatten or serialize that tree because a table needs a finite set of headers and one cell value per row and column.
JSON Lines changes the outer framing rather than the value rules. Each non-empty line is parsed as its own JSON value, so an event log with 500 lines becomes 500 records without wrapping the file in square brackets. Blank lines are ignored by this converter, but a non-empty line that is not valid JSON stops the strict JSONL path with a line-specific error.
Path selection happens after parsing. A blank path uses the parsed root. Dot/bracket notation walks ordinary object keys and numeric array positions, while JSON Pointer uses slash-separated reference tokens and its own escaping rules for literal slash and tilde characters. If the selected path cannot be resolved, the conversion warns and uses root data so the page can still show a recoverable result.
Transformation Core:
| Stage | Rule | Review Check |
|---|---|---|
| Parse | Strict JSON parses one complete JSON text. Strict JSONL parses each non-empty line. Auto detect tries JSON first, then JSONL. | Use strict mode when you need the error to identify the source shape. |
| Select | Blank path keeps the root. Dot/bracket paths and JSON Pointer paths can select nested values. | A path warning means the output is using root data, not the typed path. |
| Recordize | A selected array becomes multiple records. A selected object, scalar, null, or empty structure becomes a single record shape. | Compare the summary record count with the source system's expected count. |
| Flatten | Nested objects and arrays either expand into path-style headers or stay serialized in cells, depending on the flattening switches. | Wide headers and sparse coverage suggest the tree may not fit a simple table. |
| Format | The same selected data feeds the grid, path audit, pretty JSON, and chosen handoff text. | Keep settings fixed when comparing two runs. |
Path and Header Rules:
| Choice | Behavior | Consequence |
|---|---|---|
| Dot path | items[0].records walks object keys and array indexes. | Readable for common API wrappers and hand-written paths. |
| JSON Pointer | /items/0/records walks slash-separated tokens; ~1 means slash and ~0 means tilde inside a token. | Useful when another system already reports pointer-style paths. |
| Header case | Generated headers can stay preserved or become snake_case, kebab-case, or camelCase. | Name collisions receive numeric suffixes instead of merging two fields. |
| Null as blank | Null and missing values can display as empty cells or visible null text. | Blank cells are cleaner for spreadsheets, but visible null is safer for audits. |
| Preview rows | The visible grid is capped between 10 and 2000 rows. | Exports and downloads still use the full selected dataset. |
Worked Transformation Path:
An input such as {"meta":{"page":1},"items":[{"id":"9007199254740993","owner":{"name":"Ada"},"tags":["ops","release"]}]} becomes a table only after the record branch is chosen. With Record path set to items, object and array flattening on, and preserved headers, the selected array becomes one record with headers such as id, owner.name, tags[0], and tags[1]. If array flattening is off, tags remains one JSON text cell instead of two positional columns.
Precision checks focus on parsed numeric values. The decimal digits in a quoted identifier stay text, while an unquoted integer above 9,007,199,254,740,991 is flagged because browser number handling can no longer guarantee exact integer comparison. That warning matters most for account IDs, ticket IDs, order numbers, and other identifiers that look numeric but should not be rounded.
Privacy Notes:
Pasted text and selected files are read and converted in the browser after the page loads. Regular previews, copied text, CSV output, document exports, and JSON output are generated from that local parsed data. Requesting XLSX output may load spreadsheet code from a public CDN; the workbook is still built in the browser, and the JSON payload is not uploaded by the conversion workflow.
Worked Examples:
An API response contains {"meta":{"page":1},"items":[{"id":1,"owner":{"name":"Ada"}}]}. Set Record path to items and keep object flattening on. Latest conversion should show 1 record, Record Grid should include id and owner.name, and Path Atlas should confirm that the wrapper metadata is not part of the table.
A log excerpt has one object per line, such as {"event":"login"} followed by {"event":"logout"}. Strict JSONL should show a JSON Lines count of 2. If the second line is missing a closing brace, the error identifies the bad JSONL line instead of treating the whole file as one normal JSON document.
A nested payload produces 160 generated headers with arrays flattened. Risk Audit warns about header breadth, and Path Atlas shows many low-coverage paths. Turning Flatten arrays off may keep repeated values in fewer cells, which is safer when the destination cannot handle a very wide table.
A path typo such as item.records when the source key is items triggers the path warning and uses root data. Correct the path, then verify the Latest conversion record count and Path Atlas coverage before using the selected output.
FAQ:
Can I convert a single JSON object?
Yes. A single object becomes one record, and a scalar value becomes one record with a value-style field.
When should I use Strict JSONL?
Use Strict JSONL when every non-empty line should be its own JSON value, such as log events or streamed records. It gives clearer line-level errors for bad input.
Why did my record path fall back to root?
The selected path did not resolve against the parsed data. Check spelling, array indexes, and whether Path mode should be dot notation or JSON Pointer.
Does flattening change the JSON shown in the JSON tab?
No. Flattening changes the table and handoff formats. The JSON tab shows the selected branch before table shaping.
Why are unsafe integers flagged?
Parsed integer numbers above the browser safe-integer range may not keep exact digits. Keep IDs and other exact numeric-looking values as strings when precision matters.
Why is my grid shorter than the download?
Preview rows limits only the visible grid. Copy and download actions use the full selected dataset when data is available.
Glossary:
- JSON Lines
- A line-based format where each non-empty line is parsed as one JSON value.
- Record path
- The path that selects which branch of the parsed data becomes the working dataset.
- JSON Pointer
- A slash-based path syntax for identifying a value inside a JSON document.
- Flattening
- Turning nested objects and arrays into table-style path headers and cell values.
- Path Atlas
- The result view that lists generated paths, value types, coverage, and examples.
- Unsafe integer
- An integer number too large for exact browser number handling.
References:
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format, RFC Editor, December 2017.
- RFC 6901: JavaScript Object Notation (JSON) Pointer, RFC Editor, April 2013.
- JSON Lines, JSON Lines documentation.
- RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files, RFC Editor, October 2005.
- Number.MAX_SAFE_INTEGER, MDN Web Docs.