Saved

Press the star next to a tool's name to save it.

All my tools

JSON to HTML Converter

This JSON to HTML converter turns JSON data into a clean HTML table with a live preview, ready to copy into a page or download as a complete web page.

An array of objects becomes a table with a header row. A single object becomes a two-column table of keys and values. Lists become bullet lists, and nested values are placed inside their cell.

Your JSON is converted in your browser. Nothing is uploaded.

Your HTML

Paste JSON and press Convert to see the HTML.

A JSON to HTML converter turns JSON data into clean HTML you can paste into a web page, an email or a document. Paste your JSON, press Convert, and this JSON to HTML converter builds an HTML table from it, with a live preview. Copy the HTML code, or download it as a complete web page with a title and basic table styles. Everything happens in your browser.

How the JSON becomes HTML

JSON describes data as objects, arrays and simple values. The converter picks the HTML that fits each shape:

  • An array of objects, such as a list of people or products, becomes a table. Each object is a row and each key is a column, with the column names in a header row. If some objects have keys that others don't, every key still gets a column and the missing cells are left empty.
  • A single object becomes a two-column table: the key in the first column, its value in the second.
  • An array of plain values, such as a list of tags, becomes a bullet list.
  • Nested values are rendered the same way inside their cell, so an address object inside a person becomes a small table in the address cell.
  • Text, numbers, true, false and null are written as they appear.

Why a table?

MDN describes the HTML table element as representing tabular data: information presented in a two-dimensional table of rows and columns. That's exactly what most JSON exports are. The converter writes semantic HTML, with column headers in a thead section marked scope="col", and row headers for key-value tables marked scope="row", which helps screen readers announce each cell with its heading. It doesn't use old attributes such as border or cellpadding, which MDN lists as deprecated or obsolete; the full-page option adds a few lines of CSS instead.

How to use the JSON to HTML converter

  1. Paste your JSON into the box. It can be an array, an object or a single value.
  2. Tick Make a complete HTML page if you want a file that opens on its own in a browser, and give it a title.
  3. Press Convert. The HTML code appears with a preview below it.
  4. Copy the HTML or download it as an .html file.

Example

This JSON:

[{"name": "Ava", "role": "Designer", "skills": ["Figma", "CSS"]}, {"name": "Ben", "role": "Developer"}]

becomes a table with three columns, name, role and skills, and two rows. Ava's skills cell holds a bullet list of Figma and CSS, and Ben's skills cell is empty because his object has no skills key.

Safe output

Every piece of text from your JSON is escaped before it goes into the HTML: characters such as <, >, & and quotation marks are written as HTML entities. That means a value that happens to contain HTML or a script tag shows up as plain text in the table instead of running on your page. You can paste the result into a site without worrying that the data will change the page around it.

Fragment or full page?

By default you get an HTML fragment: just the table, ready to drop into an existing page, a CMS, a blog post or an HTML email. Your site's own styles will apply to it. Tick the full-page option to wrap it in a complete HTML document with a doctype, a character set, a title and simple border styles, so the file looks tidy when you open it straight in a browser or send it to someone.

Tips

  • Check your JSON first. Keys and text must use double quotes, and there must be no trailing commas. Our JSON formatter can point out errors.
  • Keep objects consistent. Using the same keys in every object gives a neater table.
  • Flatten deep data if you want a single flat table; deeply nested data makes tables inside tables.
  • Need a spreadsheet instead? Use the JSON to CSV converter.

Where JSON to HTML helps

JSON is the usual format for data from APIs, exports and configuration files, but it isn't pleasant to read. Turning it into an HTML table makes the same data easy to scan and share:

  • Reports: paste an API response or an export and get a table you can drop into a status page or wiki.
  • Emails: HTML tables display in most email programs, so you can send data to people who don't read JSON.
  • Documentation: show example responses as readable tables next to the raw JSON.
  • Quick checks: spot missing or odd values faster in rows and columns than in nested brackets.
  • Static pages: download a complete HTML file and open it in any browser, with no server or code needed.

Column order and empty cells

Columns appear in the order their keys are first seen. The first object's keys come first, then any new keys from later objects are added at the end. If an object doesn't have a key, its cell is left empty, which is different from a key whose value is null: that cell shows the word null so you can tell the two apart. Empty arrays show as an empty list, and an empty object becomes an empty table.

Styling the table

The fragment has no styles of its own, so it picks up your site's table styles. To style it yourself, target the table, th and td elements in your CSS, for example adding borders, padding and a background color for the header row. The full-page option includes a few lines of CSS that add light borders, padding and a shaded header, which you can edit in the downloaded file.

Common mistakes

  • Single quotes. JSON needs double quotes around keys and text.
  • Trailing commas after the last item make the JSON invalid.
  • Pasting JavaScript instead of JSON: keys must be quoted and functions aren't allowed.
  • Expecting styles in a fragment. Tick the full-page option for built-in borders.

What next

Use this often? Add JSON to HTML to your Home screen.

Frequently asked questions

How does the JSON to HTML converter work?

It reads your JSON and writes HTML: arrays of objects become tables with a header row, objects become key-value tables, and lists become bullet lists, with a live preview.

Can it handle nested JSON?

Yes. Nested objects and arrays are rendered inside their cell, as a small table or a list.

Is the output safe to paste into my site?

Yes. All text from the JSON is HTML-escaped, so any tags in the data show as text instead of running.

Can I get a complete web page?

Yes. Tick the full-page option to get a document with a doctype, title and basic table styles, then download it.

Is my JSON uploaded?

No. The conversion happens in your browser and nothing is sent anywhere.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools