Format Code Now
/
ConvertJSON to HTML Next: JSON to TSV ›

JSON to HTML Table Converter

CV-103

Paste JSON and get HTML. An array of objects becomes a table with a header row, and every value is escaped so markup in your data shows as text.

Runs in your browser. Nothing is uploaded.

JSON

HTML

How to use it

  1. Paste the JSON.
  2. Choose how nested values show: as nested tables, or as JSON text.
  3. Pick the indent size.
  4. Press JSON to HTML, or Full HTML page for a complete document.

How each shape is shown

An array of objects becomes a table whose header lists every key in the order first seen, and a missing key leaves an empty cell. An array of arrays becomes a table without a header. A single object becomes a table of key and value rows, and an array of plain values becomes a bulleted list. Numbers keep the exact digits you typed, and a JSON null in a cell is written as the text null.

Nested data and safety

An object or array inside a cell is shown as a nested table or list, or as compact JSON text if you pick that option. All text is HTML-escaped, so a value such as <script> appears as text and does not run. The output has no CSS, only table markup. Nesting deeper than 100 levels returns an error. The Full HTML page button wraps the table in a small document with a UTF-8 declaration.

Error messages and what to do

MessageWhat it meansFix
The JSON is nested more than 100 levels deepThe data is nested past the depth limit.Flatten the data, or pick JSON text for nested values and trim the input.

Questions people ask

How do I convert JSON to an HTML table?

Paste a JSON array of objects and press JSON to HTML. The keys become the header row and each object becomes a table row. Copy the markup into your page or download it as an .html file.

What happens to nested objects?

By default they appear as nested tables inside the cell, and nested arrays as lists or tables. Choose JSON text instead if you want each nested value as one compact piece of JSON in its cell.

Is the HTML safe to paste into a page?

Every value is HTML-escaped, so tags and ampersands in your data show as text instead of running. The table markup itself is plain. Still review the output before publishing it.

Can it style the table?

No. It writes plain table markup without classes or inline styles. If you want styling from pasted spreadsheet data, the Tableizer tool on this site adds inline styles.

What if objects have different keys?

The header lists every key found, in the order first seen. An object without a key gets an empty cell in that column, which is different from a key set to null, which shows the text null.

About this tool

An array of objects becomes a table with a header row of every key seen (first seen first), and a key missing from an object leaves an empty cell. An array of arrays becomes a table without a header, a single object becomes a table of key and value rows, and an array of other values becomes a bulleted list. Nested objects and arrays inside a cell are shown as nested tables and lists, or as JSON text if you pick that. A JSON null in a cell is written as the text null, and numbers keep the exact digits you typed. All text is HTML-escaped, so markup in your data shows as text. There is no styling, only plain table markup; the Full HTML page button wraps it in a minimal document. Nesting deeper than 100 levels is an error.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.