JSON to HTML Table Converter

Rows—
Columns—
Status—

How JSON to HTML Table Converter is calculated: Each object in the JSON array becomes one table row; the keys of the first object become the header cells, and nested objects are shown as JSON strings.

What is a json to html table converter?

A json to html table converter turns a JSON array into a table you can paste into a web page. Each object in the array becomes one row, and the keys of the first object become the column headers. The default JSON here has 2 objects and 2 columns — name and age — and converts to a table with 2 data rows.

The need comes up whenever data has to be shown, not just stored. A JSON file from an API is easy for a program to read and hard for a person to scan. A table is the opposite: a person reads it at a glance. Converting once gives you a table to paste into an HTML page, where the data is visible without any code.

This tool is pure JavaScript and runs entirely in your browser. Nothing is uploaded, nothing is stored, and there is no account to create. Paste the JSON array, copy the table.

How the conversion works

The converter reads the JSON array and takes the keys of the first object as the header row. For the default input, those keys are name and age, so the table has 2 columns. Every object in the array then becomes one row, with its values placed under the matching headers.

Values are written as plain text. A number such as 36 stays 36, a string such as Ada stays Ada, and a boolean stays true or false. A nested object or an array inside a value is shown as a JSON string, so the data is not lost — it is just presented in a compact form that fits in one cell.

Values are escaped before they are written. In HTML, the characters &, <, and > are escaped so a value containing them cannot break the table or inject markup; in Markdown, a pipe character inside a value is escaped so it cannot split the row. The escaping is what makes the output safe to paste.

Rows that are missing a key get an empty cell, and extra keys in later objects are ignored, because the header comes from the first object. Keep the keys consistent across objects and every row fills completely.

The converter reads the JSON in two passes, even though only one is visible. The first pass walks the whole structure to find the columns, because a table needs to know all its columns before it writes the first row — a key that appears only in the tenth object still needs a column, and a table that discovers it halfway through would have to be rewritten. The second pass writes the rows, one object per row, filling any missing key with an empty cell. That two-pass design is why the output is consistent even when the objects have different keys.

HTML tables, explained

An HTML table has three parts: the table itself, a header section with one row of th headings, and a body section with one row of td cells per object. The converter writes all three, with the header cells in thead and the data rows in tbody, which is the correct structure for a table that a screen reader or a stylesheet can work with.

The header row is the contract. It names the columns, and every data row must have the same number of cells. A table with a ragged row — three cells in one row and two in the next — renders badly in a browser, which is why the converter always writes the same number of cells in every row, filling gaps with empty cells.

Styling is separate from structure. The HTML table this tool produces has no classes and no inline styles, so it takes the styling of the page it is pasted into. Add your own class to the table tag if your site styles tables with one. The Markdown table takes the styling of the renderer, which is the same on every page.

A worked example: a team table

Take the default JSON: two objects, Ada aged 36 and Grace aged 40. That is 2 rows and 2 columns. Convert it and you get a table with a header row of name and age, then two data rows: Ada 36, and Grace 40. Paste it into a web page and the table appears at once, with the browser's default table styling.

Try a wider object to see the header grow: add a city key to both objects and the table gains a third column. The header always comes from the first object, so add the new key to the first object as well as the rest — otherwise the column exists in the data but not in the header.

Try an error to see the boundary: paste a JSON object instead of an array, such as {"name": "Ada"}, and the converter reports that the top level must be an array of objects. Wrap the object in square brackets — [{"name": "Ada"}] — and it converts.

Who uses a table converter, and why

Developers writing documentation are the main users. An API returns a JSON array, and the docs need a table showing the same data — a list of endpoints, a table of users, a set of example records. Converting once gives a table to paste into the docs, instead of retyping every value.

Technical writers are the second group. A README with a table of features, a changelog with a table of versions, or a wiki page with a table of settings all start as data and end as tables. A converter keeps the table in sync with the data: change the JSON, convert again, and the table is current.

Analysts and support staff are a third group. A JSON export from a tool needs to become a table for a report or an email, and the converter does it without a spreadsheet. A JSON to CSV converter covers the same need for spreadsheets.

Support teams are a third group. A customer sends a JSON export of their data and asks what it contains, and a table is the fastest answer — a support agent can read a table at a glance, while raw JSON needs parsing in the head. The converter turns the export into a table that can be pasted into a ticket or an email, and the customer can see their own data in a shape they recognise. The table is also easier to forward, because it renders in any email client.

Table converter vs other JSON tools

A table converter shows data; other JSON tools change it or check it. The JSON to CSV converter on this site turns the same array into a spreadsheet file, which suits analysis, while this tool turns it into a table, which suits reading. The data is the same; the destination is the choice.

A JSON formatter tidies JSON that stays JSON, and a JSON validator checks whether JSON is valid. Use the formatter when the JSON is the deliverable, the validator when you are not sure the JSON parses, and this tool when a human needs to read the data.

All three share the same design: paste, convert, copy, with the data never leaving the browser. If your JSON is already valid and only needs showing, this is the fastest tool for the job.

Common table conversion mistakes

The first mistake is a ragged array: objects with different keys. The header comes from the first object, so a key that appears only in the third object has no column, and its values are silently dropped. Keep the keys identical across objects, or put the object with the most keys first.

Second: nested objects in cells. A value that is itself an object is shown as a JSON string, which is correct but hard to read in a table. Flatten nested data before converting — pull the nested keys up to the top level — and the table stays readable.

Third: pasting a JSON object instead of an array. A single object has no rows, so the converter reports an error. Wrap it in square brackets to make a one-row array, and it converts.

Fourth: forgetting that the output is unstyled. The HTML table has no classes, so it takes the page's default table styling, which may be plain. Add a class or a stylesheet rule if the table needs to match your site — the structure is correct, and the styling is yours to add.

A second mistake is pasting a very large array and expecting the browser to stay fast. A table with ten thousand rows is ten thousand rows of HTML, and the page will be slow to render and slower to copy. The practical limit for a table you mean to paste into a document is a few hundred rows; beyond that, the table belongs in a file of its own, or the data should be filtered before converting. The converter will still produce the table, but the browser will take its time, and the document that receives it will be heavy.

How to use this json to html table converter

Paste your JSON array into the box — the default has 2 objects and 2 columns — and the table appears instantly in the box below, with the row and column counts above it. The status reads Valid when the input parses cleanly.

To copy the result, use the Copy button next to the output box, then paste it into your web page. If the input has an error, the output names the problem — fix the JSON and paste again.

Everything runs in your browser. No sign-up, no account, no data sent anywhere — your JSON never leaves your device. It works offline once the page has loaded.

Paste the JSON array, press convert, and read the table before you copy it. The header row shows the columns the converter found, and the first data row should have a value under every column — an empty cell means that object had no value for that key, which is normal when the objects have different shapes. When the table looks right, copy the HTML and paste it into the page or document where the table belongs, and check that the table renders with its borders and header intact.

Frequently Asked Questions

An array of objects, such as [{"name": "Ada", "age": 36}, {"name": "Grace", "age": 40}]. The keys of the first object become the header, and each object becomes one row. A single object without square brackets is an error — wrap it in brackets first.

The header comes from the first object, so a key that appears only in a later object has no column and its values are dropped. Rows missing a key get an empty cell. Keep the keys identical across objects for a complete table.

As a JSON string, so the data is not lost. A value such as {"city": "London"} appears as the text {"city":"London"} in its cell. For a readable table, flatten nested data before converting.

Yes. Everything runs in your browser — your JSON is never uploaded, stored, or sent anywhere. You can use it offline once the page has loaded.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.