Developer tools

JSON to table converter

This JSON to table converter lays out a JSON array as rows and columns: each item becomes a row and each object key becomes a column. Nested objects and arrays stay as JSON text in their cells. Copy the table as CSV, or download CSV or an HTML file. The conversion runs in your browser.

Processed in your browser

Paste JSON, or open a UTF-8 file.

Enable JavaScript to build a table.

From JSON to rows

  1. Array items become rows

    Each top-level array item gets a row. A single object or scalar gets one row. An empty array has no rows.

  2. Keys become columns

    All object keys are included in first-seen order. Mixed arrays use a separate (whole value) column for non-object items.

  3. Nested values stay JSON

    Objects and arrays remain in their cells. Nothing is flattened. Numbers keep their original digits and exponent text.

  4. Missing stays visible

    The preview uses JSON notation: "" is an empty string, null is null, and missing means no field.

How to convert JSON to a table

Paste JSON into the JSON input box, or select Open file to read a UTF-8 .json or .txt file. Load example fills the box with three records that mix a nested object, missing fields and a long ID. Select Build table, and the table appears under Table result with a count of its rows and data columns.

The preview shows 25 rows and 8 data columns at a time. Next rows, Previous rows, Next columns and Previous columns move through the rest. To change the data, edit the text and select Build table again, since an edit clears the old table. Cancel stops a slow build, and Reset clears the input and the table.

  1. Paste JSON or open a file

    Use JSON input or Open file for UTF-8 JSON. Load example tries three records with nested values and a long ID.

  2. Build and browse the table

    Select Build table. Next rows and Next columns reveal the rest. Edit the input and rebuild to replace the result.

  3. Copy CSV or save the table

    Select Copy CSV, Download CSV or Download HTML. Each export contains every row and column. HTML keeps visible JSON type differences.

Example: three records, five columns

Load example builds 3 rows and 5 data columns. The columns are "name", "id", "profile", "note" and "tags", in the order that the keys first appear. Sam has no id, so that cell reads missing, while the profile of the second record reads null because its value is null.

The profile of the first record stays in one cell as {"role":"admin","active":true}, and the tags of Sam stay as ["reader","editor"]. The tool does not flatten nested data into columns such as profile.role. To make rows from a nested list, paste only that array as the input.

An array of arrays, such as [[1,2],[3,4]], gives one column named (whole value). A mixed array puts objects under their keys and every other value under (whole value). A single object gives one row, and an empty array gives 0 rows.

Open the table in Excel or Google Sheets

Download CSV saves json-table.csv, and Copy CSV puts the same text on the clipboard. Both hold every row and column, not only the page on screen, plus a Row column with the record number. Strings lose their JSON quotes, missing fields are empty cells, null is written as null and nested values keep their JSON text.

The header keeps JSON quotes around each key, so a column reads "name" with the quotes. A spreadsheet may round a long number such as 9007199254740993 or turn text into a date. Import those columns as text to keep them as they are.

Spreadsheet-safe CSV is on by default. It puts an apostrophe before a cell whose first non-whitespace character is =, +, - or @. A cell that starts with a tab or line break also gains an apostrophe. The result reports how many cells changed. In the example, the note =1+1 becomes '=1+1. This also changes negative numbers, so clear the box for numeric data that you trust. Spreadsheet formula handling varies, so check the imported cells before using them.

Numbers, null and missing values

The table keeps the exact text of each number. 9007199254740993 stays 9007199254740993, -0 stays -0, 1e999 stays 1e999 and 1.50 keeps its last zero. JSON.parse in JavaScript reads these as numbers, which print as 9007199254740992, 0, Infinity and 1.5.

The preview and the HTML file show values in JSON notation: strings keep their quotes, null is null and an absent field reads missing. So an empty string, null, the string "null" and a missing field all look different. Markup such as an img tag is shown as text, and the HTML file loads no scripts, images or other files.

CSV has no types, so it cannot keep all four apart. An empty string and a missing field both become an empty cell, and null and the string "null" both become null. Use Download HTML when that difference matters to you or to the person who reads the file.

Limits

The tool reads strict JSON only. Comments, trailing commas, single quotes, empty input and a key repeated in one object stop the build with an error that gives the character position. A JSON Lines file, with one object on each line, fails the same way, so wrap the records in square brackets with commas between them first.

Nested data is not flattened into extra columns. The output is CSV or HTML only, with no .xlsx workbook, SQL or Markdown table, and the tool does not turn a table back into JSON. Files must be UTF-8, and a byte order mark at the start is ignored.

The tool sets no cap on input size, rows or columns. A very large file is limited by the memory and string length limits of your browser, and the build can then stop with an error. Cancel stops a slow build and keeps your input ready for another try.

Questions

How do I turn JSON data into a table?

Paste the JSON into the JSON input box and select Build table. A top-level array gives one row for each item, and each object key becomes a column in the order it first appears. The table shows 25 rows and 8 columns at a time, and the buttons under it move through the rest.

How can I convert a JSON file to an Excel table?

Select Open file and pick the UTF-8 .json file, then select Download CSV. Open the CSV in Excel, or import it with From Text/CSV and set long ID or date columns to Text so that Excel keeps their digits. The CSV holds every row and column, with nested values as JSON text.

How do I display JSON data in table format?

Build the table and read it on the page, or select Download HTML. The file json-table.html holds one table with every row and column, a Row column and the values in JSON notation, with missing fields marked. It runs no script and loads no outside files, so it opens as a plain page in a browser.

What happens to nested objects and arrays?

They stay in one cell as JSON text, with their original spacing. In the example, the profile column holds {"role":"admin","active":true} for the first record. The tool does not split nested fields into columns. To make the items of a nested array into rows, paste that array alone as the input and build again.

Why does my JSON show an error?

The tool accepts strict JSON only. Comments, trailing commas, single quotes, empty input and a key repeated in one object are errors, and the message gives the character position. A file must also be valid UTF-8. Fix the first error at that position, then select Build table again to check the rest.

Is my JSON uploaded?

No. The text or file is parsed, laid out and exported by a worker in your browser, and nothing is uploaded, logged or stored. Downloads are made on this page. Reset clears the input, the table and the download links, but it does not delete a file that you saved or clear your clipboard.

How are encoding and CSV line breaks handled?

Open file reads UTF-8 and ignores a byte order mark at the start. Pasted line endings use the browser's LF format, while nested JSON keeps its source spacing. Unpaired Unicode surrogates appear as visible escapes such as \ud800 so that saving UTF-8 does not silently replace them. CSV quotes every field, doubles any quote inside it and uses CRLF between records. A line break inside a string stays inside its quoted CSV field.

  • JSON Tree Viewer: explore nested JSON as a tree and copy exact values and paths.
  • JSON Validator: find the line and column of a syntax error before you build a table.
  • CSV Viewer: open the exported CSV and search every field as text.
  • CSV to SQL: turn the exported CSV into SQLite, PostgreSQL or MySQL inserts.
  • JSON Diff: compare two JSON files by structure, exact numbers and paths.