JSON to HTML Table Converter

Generate a semantic HTML table, with a header row and escaped cells, from a JSON array of objects.

JSON
HTML
Runs locally in your browser

About the JSON to HTML Table Converter

This converter produces the plain table markup most pages need: a <table> with a <thead> holding one <th> per key and a <tbody> with one row per object. Nested objects are flattened into dotted column names so no data is hidden in a cell. Every cell value is HTML-escaped, so strings containing angle brackets or ampersands render as text instead of breaking the page.

No inline styles or classes are added; the output is meant to sit inside your own CSS. Add a class to the table element after pasting if your stylesheet needs one. Because the rows are indented and one per line, the markup is easy to review in a pull request.

To see the table rendered rather than as code, use the HTML Viewer, or paste the output into an email editor that accepts HTML source.

How to use

  1. Paste a JSON array of objects on the left.
  2. Copy the table markup from the right pane.
  3. Paste into your HTML file, CMS source view or email template.

Common questions

Does it add CSS or Bootstrap classes?
No. The markup is unstyled so that it inherits your own styles. Add a class attribute after pasting if needed.
What about nested JSON?
Nested objects are flattened to dotted column headers, such as dimensions.height_cm, so every value gets its own column.
Are values escaped?
Yes. Characters that are special in HTML are converted to entities inside every cell and header, so the table cannot inject markup.