JSON to HTML Table — Turn an Array of Objects into Safe <table> Markup
Render JSON array rows into semantic <table><thead><tbody> HTML markup.
3 data rows, 7 columns.
| hostname | ip | vlan | site.city | site.rack | active | note |
| core-rtr | 10.0.0.1 | 1 | Jakarta | A1 | true | |
| sw-akses-01 | 10.0.10.11 | 10 | Bandung | true | uplink <10G> | cadangan | |
| ap-lobby | 10.0.20.5 | 20 | false | dua baris catatan |
- An array of objects gets one column per key (nested objects become a.b columns, arrays are written as JSON text, null becomes an empty cell). An array of arrays is read row by row.
- Cell text is escaped (&, <, >, ") so text such as <10G> shows as written and cannot inject HTML.
When to use the JSON Array to Clean HTML <table> Markup Converter
One column per key
Each object in the array becomes a row and each key becomes a column in the order it first appears. Nested objects such as site.city get their own column, and a key missing from an object becomes an empty cell.
Tidy, semantic markup
The output uses thead with th for the column titles and tbody with td for the data, plus a caption when you give one. Indent with 2 spaces, 4 spaces, a tab, or write it on one line to drop into a template.
Cell text cannot inject HTML
The characters &, <, > and quotes are escaped, so text such as <10G> or a script in the data shows as plain text. Testing reads the table back with Python's HTML parser and gets exactly the same cell text.
Line breaks inside a cell
Notes that run over several lines can be written with <br> so they still stack in the browser. With the option off, line breaks are left as they are and the browser shows them as spaces.
Frequently asked questions
What kind of JSON can it read?
An array of objects, an array of arrays (row by row), an array of plain values, or a single object. An array that mixes objects with plain values is reported with its position.
What about arrays inside an object?
Arrays are written as JSON text in one cell, such as ["core","bgp"], so no data is lost.
Does it add CSS?
No. The markup is left plain so it takes your site's styles; add your own classes if needed.
Is my data uploaded?
No. The conversion runs entirely in your browser.
Similar tools
- JSON Formatter & Syntax PrettifierFormat messy single-line JSON with 2/4-space indentation and sorted keys.
- JSON Minifier & Whitespace CompressorStrip whitespace and newlines from JSON payloads and compare byte savings.
- RFC 8259 JSON Syntax Validator & DebuggerPinpoint trailing commas, unquoted keys & syntax errors with line/column clues.
- Interactive Collapsible JSON Tree ViewerInspect nested JSON keys, data types and object counts cleanly in a collapsible tree.