JSON to HTML Table
Turn JSON arrays into HTML table code with keys as columns and live preview.
Add JSON and click Convert to see the HTML here.
How JSON to HTML Table works
Turns JSON into HTML table code. Each object in an array becomes a row, and each key becomes a column. Keys are collected from all objects, so an object with an extra key adds a new column.
All text is escaped, so characters like < and & cannot break your page. Click the preview button to see the table as it will look.
Input to JSON to HTML Table
- Paste or type JSON into the input box, or upload or drop a .json or .txt file.
- Best input is an array of objects. A single object gives one row. An array of plain values, like numbers, gives one column named value.
- CSS class adds a class to the <table> tag, like class="table". Leave it empty for no class.
- Input must be valid JSON. If it is not, you see the line and column of the first error. Files up to 20MB, and everything runs in your browser.
Output from JSON to HTML Table
- HTML code with the keys in <thead> and the rows in <tbody>, indented with 2 spaces.
- Missing keys and null values give empty cells. Nested objects and arrays show as JSON text in the cell.
- Copy it or download it as table.html. Preview shows the first 300 rows.