| # | {{ header }} |
|---|---|
| {{ row.index }} | {{ cell }} |
| No rows to preview yet. |
{{ csvText }}
{{ tsvText }}
{{ xmlText }}
{{ htmlTable }}
{{ markdownTable }}
{{ sqlInsertText }}
JavaScript object notation data is structured text that represents nested records, lists, and simple values, and it often needs to be checked or reshaped before you share or import it. The converter turns that structure into clear rows and columns so you can see what is inside without reading raw braces and brackets.
You paste or drop a file of structured text into the box, choose which branch of the data should be treated as individual records, and then view an instant table with column names and readable values. The summary badges highlight the main type at the top, the number of records and fields, the nesting depth, and an approximate size in bytes so you can spot unusual shapes early.
A typical use is taking a feed of analytics events where each item includes user details and nested project lists, then turning that collection into a spreadsheet ready table for review with a team. You can flatten nested objects and arrays into dotted paths so that each project, score, and flag becomes a cell that can be filtered or sorted by other systems.
Results describe the structural layout of your data and do not replace checks of business rules or permissions. For consistent comparisons you can keep the same path and flattening options between runs and avoid pasting secrets or production credentials into shared screens, especially when projecting work during meetings. If a preview looks unexpectedly shallow or wide it often means the chosen branch or flattening switches need adjustment rather than that the source itself is broken.
JavaScript Object Notation (JSON) input is parsed using the host environment's JSON parser into standard arrays, objects, strings, numbers, booleans, and null values. The component then distinguishes between the overall root value and an optional target branch selected through the data path so you can focus tabular exports on a specific array or object.
From that parsed structure the converter computes a root type label, a target type label, the recordCount, the fieldCount, the maximum nesting depth, and the sizeBytes of the original text measured in bytes using UTF-8 encoding. These metrics are shown as badges so you can judge whether you are inspecting a list of records, a single object, or a mixture, and whether the depth or byte size matches expectations for the dataset.
When a target branch is chosen the working value is normalised into an array so that a single object becomes a one element list, which keeps the downstream flattening logic consistent. Each entry is flattened into a record by recursively walking nested objects and arrays, combining property names and array indexes into dotted paths such as projects[0].code, and optionally stringifying whole subtrees when flattening of objects or arrays is disabled.
Flattened records are collected into a union of header keys in first seen order, then each cell is formatted so that numbers and booleans stay as simple tokens, null becomes the literal string null or an empty cell depending on the null as blank toggle, and remaining structures are serialised as JSON text. The same flattened headers and cell values are reused to build the preview table, comma separated and tab separated text, HTML and Markdown tables, JSON Lines, an XML tree, and an SQL INSERT script.
| Symbol | Meaning | Unit/Datatype | Source |
|---|---|---|---|
rootType |
Type of the original parsed value. | String | Derived from parsed JSON. |
targetType |
Type of the value reached by the configured data path. | String | Derived from resolved branch. |
recordCount |
Number of records produced after normalising the target value into an array. | Integer | Derived from working array. |
fieldCount |
Number of distinct flattened field keys across all records. | Integer | Derived from flattened records. |
depth |
Maximum nesting depth encountered while traversing the parsed JSON structure. | Integer | Derived by recursive walk. |
sizeBytes |
Length of the original text measured as UTF-8 encoded bytes. | Integer | Derived from raw input text. |
For example, loading the bundled sample data of two team members and leaving the data path blank produces a rootType of Array, a targetType of Array, a recordCount of 2, and a fieldCount that covers identifiers, names, teams, activity flags, scores, projects, and timestamps. Depth reflects the nested projects list, while sizeBytes corresponds to the raw text length, so any large jump in size or depth between similar samples is a quick signal that the shape has changed.
Validation and bounds
| Field | Type | Min | Max | Step/Pattern | Error Text | Placeholder |
|---|---|---|---|---|---|---|
input_text |
Text area | Valid JSON | Browser limit | Strict JSON syntax without comments or trailing commas. | Unable to parse JSON: <message>. | Sample array of member records. |
array_path |
String | 0 characters | Unbounded | Dot notation or JSON Pointer segments. | Path not found, using root data. | items.details[0] or /items/0/details |
indent_size |
Number | 2 | 8 | Step 1; out-of-range values are clamped. | Invalid values fall back to default width. | Defaults to 2 spaces. |
sort_keys |
Enum | n/a | n/a | Values none, asc, desc. | Invalid values treated as none. | Preserve order. |
flatten_objects |
Boolean switch | n/a | n/a | When false, nested objects may be kept as JSON strings. | No explicit error; affects fieldCount and cells. | On by default. |
flatten_arrays |
Boolean switch | n/a | n/a | When false, arrays are kept as JSON strings. | No explicit error; affects fieldCount and cells. | On by default. |
null_as_blank |
Boolean switch | n/a | n/a | When true, null and non-finite numbers render as empty cells. | No explicit error; may hide missing values. | Off by default. |
max_preview_rows |
Number | 10 | 1000 | Step 10; values outside range are clamped. | No explicit error; previewTrimmed flag indicates truncation. | Defaults to 200 rows. |
xml_root |
String | 0 characters | 32 characters | Invalid characters replaced; non-letter starts prefixed automatically. | No explicit error; tag names are sanitised. | dataset |
xml_item |
String | 0 characters | 32 characters | Invalid characters replaced; non-letter starts prefixed automatically. | No explicit error; tag names are sanitised. | item |
sql_table |
String | 0 characters | 64 characters | Non-alphanumeric characters removed or replaced; leading digits prefixed with c_. | Empty names fall back to dataset. | dataset |
I/O formats and rounding
| Input | Accepted Families | Output | Encoding/Precision | Rounding |
|---|---|---|---|---|
| Text area or dropped file. | JSON documents as UTF-8 text. | Pretty JSON, structural metrics, and XML. | Uses host JSON parser; strings kept as Unicode. | No extra rounding beyond environment number formatting. |
| Array or object at data path. | Array of objects, single object wrapped into array. | Preview table plus CSV, TSV, HTML, Markdown, JSON Lines, and SQL. | Cells formatted as strings, numbers, booleans, null, or JSON text. | Numeric values preserved as parsed; non-finite values mapped to null or blanks. |
| Flattened records. | Records built from nested branches. | XLSX sheet and DOCX summary exports. | Export helpers construct tables from current headers and data rows. | No additional numeric transformation during document generation. |
Assumptions and limitations
Edge cases and error sources
Parsing, flattening, and export generation are executed by scripts within the page; this component does not post your data to remote endpoints, though an auxiliary script for spreadsheet export may be fetched, and you should avoid pasting credentials or personal identifiers on shared or untrusted devices.
Converting structured JSON data into tables and export formats follows a short sequence that starts with clean input and ends with files or snippets ready to share.
As a quick example, paste the bundled team sample, leave the data path empty, keep both flatten options on, and switch to the Data and CSV views to see two rows, one per person, with project and score details available as columns.
Pro tip: test new data paths on small samples first, then apply them to full exports once the preview metrics look plausible.
Once you are comfortable with the structure and exports, you can treat the converter as a staging step between raw feeds and downstream analysis tools.
The converter runs entirely within the page using client-side scripting, and parsed structures stay in memory only while the page is open. Clipboard and download actions hand the generated text to your device without adding background storage within this component.
Close the tab when finished to clear state.You can work with pretty JSON, JSON Lines, CSV, TSV, HTML tables, Markdown tables, XML documents, and SQL INSERT statements, plus DOCX and XLSX exports built from the same flattened records. Each format uses the same header set so columns stay consistent between downloads.
Some formats are disabled until records and headers are available.Conversion is exact with respect to JSON parsing and flattening, and numbers, booleans, and null values maintain their semantics. Extremely large integers follow the host environment's numeric limits, and complex nested structures may be serialised as JSON strings when flattening is disabled.
Use domain checks elsewhere for business rules.You choose the structural slice via the data path, which can point to the root, a nested array, or a single object. Preview row limits affect only the on-screen table; downloads always include every record exposed by the resolved branch.
Filtering by value must be done in downstream tools.Once the page and its helper scripts are loaded, parsing, flattening, and most export formats continue to work without further requests. Spreadsheet export may need a one-time helper download; if that fails you will see a warning while other formats remain available.
Refreshing the page while offline may disable features that depend on external scripts.The JSON, CSV, TSV, XML, HTML, Markdown, and SQL text generated here is plain structured data. Any licensing, redistribution rules, or retention policies depend on your source systems and organisational guidelines rather than on the converter itself.
Check data governance rules before sharing exports externally.Set the data path to the branch that contains that array, using dot notation such as items[0].details or JSON Pointer syntax such as /items/0/details. When the path resolves successfully, the array elements become the records shown in the preview and exports.
If a warning appears, adjust the path and recompute.Depth counts how many layers of arrays and objects are nested inside the root, so very large values usually indicate multiple wrappers or embedded lists. Depth by itself is not an error, but sudden changes between runs can signal that a feed has gained or lost structure.
Combine depth with record and field counts for a fuller picture.