What does a JSON to HTML table converter do?
Data from an API usually arrives as a JSON array of records. To show it on a web page, in an email or in documentation, you need rows and columns. This JSON to HTML table converter builds that markup for you, and updates as you type.
The columns are the union of all keys found in the array, in order of first appearance. A row that lacks a key gets an empty cell. Values are HTML-escaped, so text such as <b> shows as text and does not run. Style chooses the classes: Plain (none), Bootstrap 5, Tailwind CSS or a Custom class you type. You can hide the header row, show or hide nulls, and tick Flatten nested objects to turn {"address":{"city":"Rome"}} into an address.city column.
Some limits: the input must be an array, and arrays or objects inside a cell, when not flattened, are written as JSON text. The tool makes markup, not a sortable or paginated grid. If your data is in a spreadsheet instead, try CSV to HTML table.
How to turn a JSON array into an HTML table
- Paste a JSON array into JSON Input, or click Sample. The table builds as you type.
- Pick Style: Plain, Bootstrap 5, Tailwind CSS or Custom class, and type the class name if you chose Custom.
- Choose Header row, Flatten nested objects and Show null values as needed.
- Check the Preview tab to see how the table looks, then go back to HTML.
- Press Copy to take the table markup.
- Use Download .html to get a complete page named table.html.
Options in this JSON to HTML table tool
Union of all keys
Rows with different keys still line up. Every key seen anywhere becomes a column, and missing values are left blank.
Flatten nested objects
Nested objects become dotted columns such as address.city. Arrays stay as JSON text in one cell.
Four class styles
Plain adds no class. Bootstrap adds table table-striped table-hover table-bordered. Tailwind adds utility classes to the table, th and td. Custom uses your class name.
Null display
Null values show as a grey null by default, or as empty cells when you untick Show null values.
Live preview
The Preview tab renders the generated table inside the page, so you can see spacing and striping.
Safe escaping
Ampersands, angle brackets and quotes in your data are escaped, so values cannot inject markup.
When a JSON table helps
- Showing API data on a static page. Paste a response and copy the table into a page or CMS block without writing a loop.
- Report snippets for email or docs. Use Plain style to get clean table code that you can style with your own CSS.
- Prototyping an admin screen. Designers can see how a list of records looks in Bootstrap or Tailwind before the real component exists.
- Teaching HTML tables. Instructors can show how thead, tbody, th and td map from a JSON list.
Tips for clean table output
- A single object must be wrapped in square brackets, for example
[{"id":1}], to be accepted. - Use Flatten when objects are nested one level, and skip it when you want nested values shown as JSON in the cell.
- Bootstrap and Tailwind classes only look styled if that CSS is loaded on the page you paste into.
- Array items that are not objects, such as numbers, appear in a single column called
_value. - For documents rather than web pages, JSON to Markdown gives pipe tables instead.
Is it safe? Privacy and limits
The table is generated by JavaScript in your browser. The JSON is not sent to a server and no account is needed. The preview shows your own data using this page's styles. The generated HTML is escaped, but you are responsible for how you publish it. The downloaded table.html is a basic page with a title of Table and no styles of its own.
JSON to HTML table FAQ
A table is made of rows, so the converter treats each item in the array as one row. If your JSON is a single object, wrap it in square brackets, like [{"name":"Ada"}], and you get a one-row table. If your data sits under a key, such as {"users":[...]}, copy only the array. The tool does not search objects for arrays, so it cannot pick the list out for you.
The header is the union of every key found in the array, listed in the order each key first appears. Rows that lack a key show an empty cell, and a row with a key nobody else has adds a new column. So a ragged array still produces a rectangular table. If you want a fixed column order, put the keys in that order in the first object. This is how the tool keeps ragged data readable.
It expands nested objects into separate columns named with dots. {"user":{"name":"Ada","age":36}} becomes columns user.name and user.age. It works at any depth, so a three-level object gives one dotted name with three parts. Arrays are not expanded: they remain in a cell as JSON text, for example ["a","b"]. With Flatten off, a nested object is shown in a single cell as JSON text. Flattening is handy before exporting to a spreadsheet.
Plain adds no class. Bootstrap 5 adds table table-striped table-hover table-bordered to the table element. Tailwind adds w-full border-collapse text-sm on the table, with border and padding utility classes on th and td. Custom puts your text in the table class, or my-table if empty. The page you paste into must load the matching CSS or you will see an unstyled table. Adjust the class strings in the copied markup if your design system uses other names.
Booleans and numbers are shown as text, so true appears as the word true. A null is shown as a grey italic word null, unless you untick Show null values, which leaves the cell empty. Undefined or missing keys always appear empty. There is no number formatting, alignment or sorting, so columns of numbers stay left aligned as plain text, and any format such as currency has to be added in your own CSS or by editing the generated cells.
The preview inserts the same HTML into the page, so it uses whatever CSS this page already has. Bootstrap classes are usually styled here, and Tailwind classes may not be, since this page may not load Tailwind. A plain-looking preview does not mean your output is wrong. Test the copied markup on the page where it will live, with your own CSS loaded, and adjust the classes if the spacing is off.
Cell text is escaped for ampersands, angle brackets and double quotes, so data cannot add tags or scripts to the table. The custom class name you type is placed in an attribute, so use ordinary names without quotes. The null label has an inline grey colour. Beyond that, how you publish and sanitise the page is up to you, and you should still review the output before pasting it into a CMS that runs scripts.
No. The JSON is parsed and the table is built inside your browser, with no upload and no signup. Download .html saves a table.html file locally. You can use other local converters on this site, such as JSON to Markdown, the same way. Avoid pasting private customer data into any online tool unless you are comfortable with that, and use masked sample rows when you only need the layout.