Skip to content
{ }JSON Formatter

JSON to HTML Table

Convert a JSON array of objects into a clean, semantic HTML table — thead and tbody, every value HTML-escaped — ready to paste into a page, email or CMS.

Input
Output
Paste input and press To HTML table.

Paste-ready table markup

Sometimes you don't want an interactive grid — you want the raw <table> markup to drop into a web page, a newsletter, a wiki or a CMS. This tool takes a JSON array of objects and emits a semantic HTML table: the union of all keys becomes the <thead> header row, and each object becomes a <tr> in the <tbody>. The markup is indented and free of inline styles, so it inherits your site's own CSS.

Escaped, so it can't break your page

Every value is HTML-escaped&, <, >, quotes and apostrophes are converted to entities — so a value like <script> or Ben & Jerry's shows as text and can never inject markup. null is rendered as the literal word, missing values become empty cells, and nested objects or arrays are written as their compact JSON so the table stays rectangular.

Related tools

Want to view and sort the data instead of copying markup? Use the interactive JSON to Table viewer. Prefer Markdown for a README or issue? JSON to Markdown builds a GitHub-flavored table. For spreadsheets there's JSON to CSV and JSON to TSV.

Frequently asked questions

Is the markup a full HTML document?

No — it is just the <table> fragment, so you can paste it anywhere inside an existing page. It carries no inline styles and inherits whatever CSS your site applies to tables.

Are values escaped against HTML injection?

Yes. Ampersands, angle brackets, double quotes and apostrophes are all converted to entities, so a value containing <script> or an & is displayed as text and cannot alter your page structure.

How are nested objects and missing keys handled?

A nested object or array is written as its compact JSON text inside the cell. If a row lacks a key present in others, that cell is left empty; an explicit null shows the word "null".

What JSON shape does it need?

An array of objects (each becomes a row) or a single object (one row). The header is the union of all keys in first-seen order. A bare value or an array of primitives has no columns and is rejected with a clear message.