Paste or upload JSON
Add a JSON array of objects to the input panel. Use the sample button to load example user data.
Convert JSON arrays to clean HTML table code in one click. All property keys become column headers, every array item becomes a row, and you can include optional CSS, a custom class name, and download a ready-to-use HTML file, entirely in your browser.
A correct HTML table is more than rows of cells. The elements carry meaning that browsers, screen readers, and search engines all rely on, and using the right ones costs nothing extra.
A pricing table generated from a JSON array.
JSON input
HTML output
The ampersand and the less-than sign in the note column are escaped. Without that, the last row would swallow everything after <4h as an unknown tag.
Screen readers navigate tables cell by cell and announce the relevant headers as they go. That only works if the markup says which headers apply.
| Requirement | How | Why it matters |
|---|---|---|
| Header direction | scope="col" or scope="row" on every th | Tells assistive tech which cells a header labels |
| Table title | A caption element | Announced first, so a user knows what they entered |
| Row headers | First cell of each row as th, not td | Gives every data cell a row label as well as a column one |
| Complex headers | headers and id attributes | Needed when a cell has more than one applicable header |
| No layout tables | Use CSS grid or flexbox for layout | A layout table is announced as data and is meaningless read aloud |
| role="presentation" | Only on unavoidable legacy layout tables | Strips table semantics so it is not announced as a grid |
Using a table for page layout was standard practice twenty years ago and is now simply wrong. A screen reader announces a five column table and starts reading coordinates, which is a genuinely disorienting experience. CSS handles layout, tables handle data.
Any value that came from a user, an upload, or an external API is untrusted, and inserting it into HTML without escaping is a cross site scripting vulnerability.
The five characters and the safe pattern
Escape the ampersand first, otherwise you will double escape the entities you just produced. Framework templating in React, Vue, Angular, and most server side template engines escapes interpolated values by default, so the danger is concentrated in the escape hatches: dangerouslySetInnerHTML, v-html, and any raw string concatenation. Escape attribute values too, since a stray quote inside an attribute lets an attacker close it and add another one.
Tables do not reflow. A ten column table on a 375 pixel screen has to give somewhere, and there are two approaches that work.
Horizontal scroll on a wrapper
The wrapper, not the table, gets the overflow. The tabindex makes the scrollable region reachable by keyboard, which is a requirement rather than a nicety, and the label tells a screen reader what the region contains. This preserves the table semantics completely and is the right default.
The alternative is a card layout below a breakpoint, where each row becomes a stacked block and the column name is shown as a label using a data attribute and a CSS pseudo element. It reads better on a phone for tables of five or six columns, and it is worse for anything where comparing values across rows is the point, since the alignment that made comparison easy is gone.
Zebra striping and a sticky header
Right align numeric columns and use tabular figures so the digits line up in columns. It makes scanning for magnitude far easier and it is one line of CSS.
Generated tables end up in a few predictable places. HTML email is the most demanding, since many clients support only inline styles and a limited CSS subset, so keep the markup simple and put styles on the elements. Documentation sites, CMS pages, and static site builds are the common cases, and there a semantic table with a stylesheet is ideal. Internal reports and exported dashboards round out the list.
Tables travel between formats constantly. Check the full converter collection for JSON to Markdown when the destination is a README rather than a web page, JSON to CSV when someone wants it in a spreadsheet, and JSON to Excel for a formatted workbook.
Add a JSON array of objects to the input panel. Use the sample button to load example user data.
Choose header row, pretty HTML formatting, optional CSS styles, and an optional CSS class name.
The HTML table code updates live. Copy it or download a complete .html file.
Paste any JSON API response and get production-ready HTML table code in seconds, no manual column mapping, no server needed.
No upload, no server. All conversion happens in your browser.
HTML output updates instantly as you type or change options.
Keys from all array items are merged so sparse arrays produce full-width tables.
Optional style block adds clean table styling ready to paste into any page.
Add a CSS class name to the table element for easy stylesheet targeting.
Export a complete .html file with your table and optional styles.
This tool takes any JSON array of objects and builds a semantic HTML table with thead, tbody, th, and td elements. Keys are collected from all objects so even sparse arrays produce correctly aligned columns. Nested objects are serialised to JSON strings inside the cell. Enable the CSS option to include a basic style block, or add your own class name to target the table with an external stylesheet.