JSONGenerator
GeneratorSchemaConvertersExamplesDocs

JSONGenerator

Free online tools for generating random JSON data and JSON Schemas.

Quick Links

  • JSON Generator
  • JSON Schema Converter
  • Examples
  • Docs
  • Blog
  • About
  • Contact
  • Privacy Policy

Converters

  • JSON to YAML
  • YAML to JSON
  • XML to JSON
  • JSON to XML
  • JSON to TOML
  • TOML to JSON
  • JSON to CSV
  • CSV to JSON
  • JSON to Excel
  • Excel to JSON
  • JSON to HTML table
  • JSON to TypeScript
  • JSON to C#
  • JSON to Go
  • JSON to Java
  • JSON to SQL

Support

Having issues? Contact us.

© 2026 JSON Generator. All rights reserved.

JSON to HTML Table Converter

Paste JSON and get a clean HTML table as you type, ready to drop into a page or email.

JSON Input

Paste JSON, upload a .json file or drop one here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[
  {
    "id": 1,
    "name": "Ada Lovelace",
    "role": "Engineer",
    "active": true,
    "address": { "city": "London", "country": "UK" },
    "skills": ["math", "analysis"]
  },
  {
    "id": 2,
    "name": "Tom & Jerry <Studios>",
    "role": "Designer",
    "active": false,
    "address": { "city": "Oslo", "country": "NO" },
    "skills": [],
    "email": "tom@example.com"
  },
  {
    "id": 3,
    "name": "Grace \"Amazing\" Hopper",
    "role": null,
    "active": true
  }
]

HTML Output

Updates as you type. Copy the markup or download table.html.

1

Converting…

Convert JSON to an HTML table online

This free JSON to HTML table converter turns an array of objects, a single object or a plain list of values into a <table> you can paste straight into a web page, an email template or a CMS. Paste the JSON on the left and the markup appears on the right, with a header row, one row per record and every special character escaped. Nothing is installed, and because the conversion runs in your browser, the data is never uploaded.

It is a quick way to preview an API response as a readable grid, to put exported data into documentation, or to hand a non-developer a table they can open in any browser. If you only need to view data, a table is often easier to scan than a screen of braces; if you need the data in a spreadsheet, the JSON to CSV converter is the better fit.

How to convert JSON to HTML

  1. Paste your JSON into the JSON Input editor, or click the upload button to open a .json file. You can also drag a file onto the editor.
  2. The HTML Output updates as you type. If the JSON is invalid, the status bar shows the parser's error so you can fix it.
  3. Choose how Nested values are shown (nested tables or JSON text), add an optional caption, and tick Full HTML page if you want a complete document rather than just the table.
  4. Click Copy to put the markup on your clipboard, or Download to save it as table.html.

JSON to HTML table example

The first record has a tags array and no email; the second has an email and no tags. The converter gives both rows the same four columns, leaves the missing cells empty, turns the array into an inner table and escapes the angle brackets and ampersand in the second name.

JSON input
[
  {
    "id": 1,
    "name": "Ada Lovelace",
    "tags": ["admin", "dev"]
  },
  {
    "id": 2,
    "name": "<Bob> & Co",
    "email": "bob@example.com"
  }
]
HTML output
<table>
  <thead>
    <tr>
      <th scope="col">id</th>
      <th scope="col">name</th>
      <th scope="col">tags</th>
      <th scope="col">email</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>Ada Lovelace</td>
      <td>
        <table>
          <tbody>
            <tr>
              <td>admin</td>
            </tr>
            <tr>
              <td>dev</td>
            </tr>
          </tbody>
        </table>
      </td>
      <td></td>
    </tr>
    <tr>
      <td>2</td>
      <td>&lt;Bob&gt; &amp; Co</td>
      <td></td>
      <td>bob@example.com</td>
    </tr>
  </tbody>
</table>

How JSON maps to a table

How JSON structures become HTML tables
JSONHTML outputNotes
Array of objectsA header row (th) plus one tr per objectColumns are the union of all keys, in the order they first appear.
Single objectTwo columns, Key and ValueEach key is a <th scope="row"> cell.
Array of strings, numbers or booleansOne column headed ValueOne row per item.
Mixed array, or array of arraysOne column, one row per itemNested items follow the Nested values option.
nullEmpty cellA missing key looks the same as null.
Number or booleanPlain texttrue, 1.5, 1e+21
Empty object or array{} or [] in a code elementNever an empty inner table.

Column order and missing keys

JSON records often differ: a field appears on some objects and not others. Rather than guessing from the first row, the converter reads every object and builds the header from all the keys it finds, in first-seen order. A record without a given key gets an empty cell, so the columns always line up. If the JSON is a single object, or the array holds anything other than objects, you get the Key and Value layout or the single Value column shown above. A bare string, number or empty document is rejected, because there is nothing to lay out as a table.

Nested objects and arrays

Real API responses are rarely flat. With Nested tables (the default), an object inside a cell becomes a small key/value table and an array of objects becomes a table of its own, so nothing is lost and the structure stays visible. Choose JSON text when you want one tidy row per record: the nested value is written as compact JSON inside a code element, with its quotes escaped.

Escaping and safe output

Keys and values are treated as text, never as markup. The characters &, <, >, " and ' are replaced with HTML entities, so a value such as <script>alert(1)</script> is displayed literally. That matters when the JSON comes from user input or a third-party API and the table ends up on a page.

Table only or full HTML page

By default you get just the table element with no inline styles and no classes, so it inherits the CSS of whatever page it is pasted into. Tick Full HTML page and the table is wrapped in a minimal <!doctype html> document with a small embedded stylesheet (borders, padding and a shaded header), which is handy for a downloaded preview. Email clients often strip or ignore style blocks, so for email start from the table-only output and add the inline styles your template needs. The optional caption becomes the table's caption element and, on a full page, the document title.

Why convert JSON to a table?

  • Previewing API responses: Paste a response from curl or your browser's network tab and read it as rows and columns.
  • Documentation and READMEs: Embed a reference table, such as supported options or sample records, in a docs page or wiki.
  • CMS and static sites: Most content editors accept an HTML block, so exported data can go in without a plugin.
  • Emails and reports: Share a quick summary of query results or form submissions with people who do not read JSON.

Need data to try it with? Generate a realistic array with the JSON Generator. To describe the structure of what you are showing, use the JSON Schema Generator, or convert the same data with the JSON to Excel converter or the JSON to CSV converter.

Frequently Asked Questions

How do I convert JSON to an HTML table?

Paste your JSON into the JSON Input editor, or upload a .json file. The HTML table appears in the output editor as you type. Copy the markup, or click Download to save it as table.html.

How are the table columns chosen?

For an array of objects, each object becomes a row and the columns are all the keys that appear anywhere in the array, in the order they are first seen. If an object lacks a key, or the value is null, its cell is left empty.

What happens to nested objects and arrays?

By default each nested object or array is rendered as a small table inside its cell. Switch Nested values to JSON text if you would rather show it as compact JSON inside a code element. Empty objects and arrays are always shown as {} and [].

Is the HTML safe to paste into my page?

Every key and value is HTML-escaped, so text such as <script> or a stray ampersand is shown literally and cannot add markup. The table-only output contains no inline styles or scripts.

Can I get a complete HTML file instead of just the table?

Yes. Tick Full HTML page to wrap the table in a minimal HTML5 document with a small embedded stylesheet, so it looks tidy when you open the downloaded table.html in a browser. Leave it off when you only want the table to paste into an existing page.

Is my JSON uploaded to a server?

No. The conversion runs entirely in your browser with JavaScript, so your data never leaves your device. That makes it fine for API responses and exports that contain private values.

Related converters

  • JSON to CSV ConverterConvert a JSON array to CSV, with nested objects flattened into columns.
  • CSV to JSON ConverterConvert CSV with a header row to a JSON array of objects, with numbers and booleans typed.
  • JSON to Excel ConverterConvert JSON to an Excel .xlsx spreadsheet you can open in Excel, Numbers or Google Sheets.
  • Excel to JSON ConverterConvert an Excel .xlsx, .xls or .ods sheet, or pasted cells, to JSON.
  • JSON to YAML ConverterConvert JSON to clean, readable YAML for config files, Kubernetes and CI pipelines.
  • YAML to JSON ConverterConvert YAML, including anchors and multi-document files, to formatted JSON.

See all JSON converters