JSON to HTML Table

Options:|

Free online JSON to HTML tool. Convert JSON arrays or nested objects into clean HTML table code with nested flatten, custom CSS hook, responsive wrap, null placeholder, and row limit protection. Code + iframe preview tabs, type-aware highlighting, and local history.

Related

About JSON to HTML and HTML Tables

A JSON to HTML converter is a practical tool that automatically transforms JSON data structures into standard HTML table code. It frees developers from the repetitive labor of hand-writing `<table>` / `<tr>` / `<td>` templates, making it ideal for quickly displaying nested API responses, configuration files, or any JSON structure as web tables.

HTML Tables are W3C-standard structured data display elements, composed of `<table>` containers, `<thead>` headers, `<tbody>` bodies, `<tr>` rows, `<th>` header cells, `<td>` data cells, `<caption>` titles, and other semantic tags. The code generated by this tool strictly follows this semantic structure, which is friendly to SEO crawling and accessibility (screen readers can recognize it).

There are three categories of JSON to HTML tools on the market: the first only generates HTML code strings (e.g. tooltt.com, codebeautify.org), emphasizing "copy and use"; the second also provides visual previews (e.g. this tool, jsontables.com, TableConvert), emphasizing "WYSIWYG"; the third supports nested expansion + Tailwind class injection (the differentiated positioning of this tool), ideal for engineers who need to embed JSON into modern frontend projects.

This tool's "Nested Flatten" is a differentiated highlight over most competitors: traditional tools would just show `{user:{name:'Alice'}}` as a `"{\"name\":\"Alice\"}"` string, but this tool recursively expands it into a `user.name` column (up to 6 levels deep, with a configurable separator). This means you can directly process real business data with complex nested structures like GitHub API, Stripe API, and Notion API, without pre-flattening with jq / lodash.

Another differentiated highlight is the "Custom CSS class hook": the tool not only generates inline styles, but also allows injecting arbitrary class strings on the `<table>` tag. This lets users of mainstream CSS frameworks like Tailwind / Bootstrap / Bulma / DaisyUI directly reuse the HTML generated by this tool and immediately get a design style consistent with their project, without manually editing CSS.

Use Cases

  • Frontend development: Quickly render JSON data from APIs into HTML tables to embed into admin dashboards or documentation pages
  • Tailwind / Bootstrap projects: Paste Tailwind or Bootstrap class names directly into the table class field for seamless integration with your existing style system
  • Responsive web pages: Default horizontal scroll wrapper prevents mobile tables from breaking the page layout
  • Data visualization display: Paste styled tables into blog, documentation, Confluence, Notion, or any platform that supports HTML embedding
  • Report generation: Quickly convert backend-exported JSON data into HTML email reports for business stakeholders
  • Frontend prototyping: Preview table styles with real data during the design phase to align with product and design before delivery
  • CMS systems: Create static HTML table snippets for WordPress, Drupal, and other CMS platforms, avoiding template engine complexity
  • Testing and debugging: Paste JSON.stringify output from the browser console to quickly preview the two-dimensional structure of complex nested data
  • Email templates: Inline the table HTML into HTML emails (test for Outlook compatibility)
  • API documentation: Embed HTML tables in Markdown, Swagger, or Redoc as a replacement for default JSON examples
  • Teaching scenarios: Convert nested JSON assignments in data structure courses into unified table displays for batch grading
  • Data cleansing reports: Use Flatten mode to convert nested JSON from database exports into tables for easy field comparison

How to Use

  1. Paste a JSON array (recommended) or a single object into the left editor, or click "Sample" to load 3 product examples, or click "Upload" to load a .json / .txt file
  2. Choose a nesting mode in the toolbar (recommended: Flat). Nested objects automatically expand to dot-separated keys like `user.name`
  3. Click "Convert" (or simply press Enter) to trigger the conversion. A 500ms debounce protects against excessive re-parsing
  4. Switch to the Code tab on the right to view the syntax-highlighted HTML table code, or the Preview tab to see the real-time iframe rendering
  5. Toggle style options in the toolbar (zebra striping, borders, hover, compact, responsive), enter a custom table class, set the null placeholder — the live preview updates instantly
  6. When satisfied, click "Copy" to copy the HTML code or "Download" to save as table.html. Click Reset if you need to start over

Features

  • Nested object auto-flatten: Recursively expand `{user:{name,age}}` into `user.name`, `user.age` columns (configurable separator), no manual flatten script needed
  • Three nesting modes: Flat (Recommended, auto-expand up to 6 levels) / Top-level Keys (nested object as single column) / String (nested object as JSON string preview)
  • Custom CSS class hook: Inject any class string into `<table>` and the optional wrapper `<div>`, seamlessly integrating with Tailwind / Bootstrap / Bulma style systems
  • Responsive horizontal scroll: Default outer wrapper with `overflow-x:auto` container, horizontal scrollbar appears automatically on narrow screens without breaking page layout
  • 6 visual style toggles: Zebra striping, borders, row hover highlight, compact mode, first-column index (#), and table caption — toolbar checkboxes apply instantly
  • Code + iframe preview dual tabs: Code tab shows syntax-highlighted HTML source; Preview tab renders the real table in a sandboxed iframe in real time
  • Type-aware highlighting: null shown as gray italic (customizable placeholder text), booleans colored green/red, numbers in blue, nested objects viewable as full JSON on hover
  • Row limit protection: Default 1000-row cap (configurable 1-10000), automatically truncates with a "Truncated" notice to prevent browser slowdowns on huge DOM
  • Generation statistics feedback: Right panel shows "Generated X rows × Y columns" + truncation badge for instant data scale visibility during long-JSON debugging
  • One-click copy / download: In Code mode, copy the HTML source to clipboard, or download as table.html file ready to use on any website
  • Sample data + file upload: 3 built-in product samples (Laptop / Mouse / Desk Chair) for one-click loading, plus drag-and-drop or click upload for .json / .txt files
  • One-click Reset: Toolbar Reset button instantly restores all 14 configuration options to defaults, perfect for fast iteration
  • Local history: localStorage-based persistence of the most recent 200 inputs, recoverable after refresh or accidental tab close
  • Fully local browser processing: All JSON parsing, HTML generation, copy and download happen in your browser, no data is uploaded to any server

Code Examples

JavaScript: Nested Flatten + Tailwind class Integration

javascript

The most common real-world usage: call the GitHub API, flatten nested objects to dot-separated keys, then integrate with Tailwind classes in your project.

// 1) Call GitHub API to fetch user list
async function fetchUsers() {
  const res = await fetch('https://api.github.com/users?per_page=10');
  return await res.json();
}

// 2) Nested flatten function (equivalent to the tool's flatten logic)
function flattenObject(obj, prefix = '', sep = '.', result = {}) {
  for (const [k, v] of Object.entries(obj || {})) {
    const key = prefix ? `${prefix}${sep}${k}` : k;
    if (v && typeof v === 'object' && !Array.isArray(v)) {
      flattenObject(v, key, sep, result);
    } else {
      result[key] = v;
    }
  }
  return result;
}

// 3) Convert flattened data to HTML table, inject Tailwind classes
function generateHtmlTable(rows) {
  const flat = rows.map(r => flattenObject(r));
  const cols = [...new Set(flat.flatMap(r => Object.keys(r)))];
  const thead = cols.map(c => `<th class="px-4 py-2 text-left">${c}</th>`).join('');
  const tbody = flat.map(r =>
    `<tr class="border-b hover:bg-gray-50">${cols.map(c => `<td class="px-4 py-2">${r[c] ?? 'N/A'}</td>`).join('')}</tr>`
  ).join('');
  return `<table class="min-w-full text-sm">
  <thead class="bg-gray-100"><tr>${thead}</tr></thead>
  <tbody>${tbody}</tbody>
</table>`;
}

// 4) Inject into the page
const users = await fetchUsers();
const html = generateHtmlTable(users);
document.getElementById('table-container').innerHTML = html;
console.log('Generated ' + users.length + ' rows, ' + (Object.keys(flattenObject(users[0])).length) + ' columns');

Python: Flask JSON to HTML Table (No Frontend Dependency)

python

In backend template rendering, you can use Python built-ins to generate the same HTML table, supporting nested flatten and class injection.

from flask import Flask, jsonify, render_template_string
import json

app = Flask(__name__)

TEMPLATE = """
<!doctype html><html><body>
<div class="overflow-x-auto">{{ table_html | safe }}</div>
</body></html>
"""

def flatten(obj, prefix='', sep='.', result=None):
    """Recursively flatten nested objects"""
    if result is None:
        result = {}
    for k, v in (obj or {}).items():
        key = f"{prefix}{sep}{k}" if prefix else k
        if isinstance(v, dict):
            flatten(v, key, sep, result)
        else:
            result[key] = v
    return result

def json_to_html_table(data, table_class='min-w-full border-collapse',
                        max_rows=1000, responsive=True):
    if isinstance(data, dict):
        data = [data]
    if not data:
        return "<p>No data</p>"

    # Row truncation
    truncated = False
    if len(data) > max_rows:
        data = data[:max_rows]
        truncated = True

    # Flatten each row
    flat_rows = [flatten(row) for row in data]

    # Collect all column names (using set to dedupe, preserving insertion order)
    columns = []
    for row in flat_rows:
        for k in row.keys():
            if k not in columns:
                columns.append(k)

    # Generate thead
    thead = "".join(f'<th class="px-4 py-2 text-left bg-gray-100">{c}</th>' for c in columns)

    # Generate table rows
    rows = []
    for i, row in enumerate(flat_rows):
        bg = "bg-gray-50" if i % 2 == 1 else ""
        tds = "".join(
            f'<td class="px-4 py-2 {bg}">{("N/A" if row.get(c) is None else row.get(c, ""))}</td>'
            for c in columns
        )
        rows.append(f'<tr class="hover:bg-blue-50">{tds}</tr>')

    html = f'<table class="{table_class}"><thead><tr>{thead}</tr></thead><tbody>{"".join(rows)}</tbody></table>'
    if responsive:
        html = f'<div class="overflow-x-auto">{html}</div>'

    if truncated:
        html = f'<p class="text-amber-600 text-sm">Data truncated to the first {max_rows} rows</p>{html}'

    return html


@app.route('/api/users')
def users():
    data = json.load(open('users.json'))
    return jsonify(data)

@app.route('/users.html')
def users_html():
    import requests
    data = requests.get('http://localhost:5000/api/users').json()
    return render_template_string(TEMPLATE, table_html=json_to_html_table(data))


if __name__ == '__main__':
    app.run(debug=True)

Command Line: jq Flatten + Generate Static HTML Report

bash

Operations scenario: aggregate nested JSON logs with jq, then paste into this tool to generate a Tailwind-class HTML report.

# 1) Use jq to aggregate and flatten nested logs to dot-separated keys
cat app.log | jq -s '
  group_by(.response.status_code) |
  map({
    status: .[0].response.status_code,
    count: length,
    "first_request.method": .[0].request.method,
    "last_request.url": .[-1].request.url,
    "first_seen": min_by(.timestamp).timestamp,
    "last_seen": max_by(.timestamp).timestamp
  })
' > stats.json

# 2) Paste stats.json into this tool
#    Select "Flat (Recommended)" in the toolbar
#    Check "Zebra striping + Responsive wrap + Borders"
#    In table class name enter: min-w-full text-sm border-collapse
#    Set null placeholder: - (missing fields show as -)
#    Set Caption: 2026-07 Production Error Log Stats
#    Click Convert then download table.html

# 3) Upload to S3 / OSS static site
aws s3 cp table.html s3://my-bucket/reports/2026-07.html --acl public-read

# Or embed into Confluence / Notion / VuePress docs
sed -i '' 's/min-w-full/min-w-full shadow-md/g' table.html

# Or send as an HTML email
mutt -e "set content_type=text/html" -s "2026-07 Error Log" your@email.com < table.html

FAQ

How do I convert JSON data into an HTML table?

Paste a JSON array (each element is an object) into the left input box, click the "Convert" button in the toolbar, and the Code tab on the right will display the HTML table code with syntax highlighting. Switch to the Preview tab to see the iframe rendering in real time, then click "Copy" to paste it into any HTML page.

Can nested JSON objects be converted into HTML tables?

Yes. This tool has a built-in nested flatten mode that recursively expands `{user:{name:'Alice',age:30}}` into `user.name` and `user.age` columns, up to 6 levels deep. You can also switch to "Top-level Keys" mode (preserves the nested object as a single-column JSON string) or "String" mode (treats everything as a string).

Can I change the separator used in flattened key names?

The default separator is `.` (producing `user.name`), matching common conventions in JavaScript, MongoDB, and Lodash. If you need `user_name` or `user/name`, customize it in the "Separator" input in the toolbar (visible to advanced users).

Can I customize the styling of the generated HTML table?

The tool offers three style customization options: ① 6 visual toggles in the toolbar (zebra striping, borders, hover, compact, index, caption) apply instantly; ② Enter a custom class in the "table class name" input (e.g. Tailwind's `min-w-full border-collapse`), injected into `<table class="...">`; ③ Directly edit the generated HTML before using it.

Do you support Tailwind / Bootstrap?

Yes. Enter Tailwind classes (e.g. `min-w-full border-collapse text-sm`) or Bootstrap classes (e.g. `table table-striped table-hover table-bordered`) in the "table class name" input — the tool injects these classes into the `<table>` tag. Note: the tool's inline styles have the highest priority and will override some Tailwind styles (background color, padding). We recommend turning off the corresponding toolbar option (such as zebra striping) before using Tailwind.

What's the difference between the Code tab and the Preview tab?

The Code tab displays the HTML source code with syntax highlighting, perfect for copying and editing. The Preview tab renders the real table in a sandboxed iframe for a WYSIWYG experience. The content is identical — both forms make it easy to switch between "view code" and "view result".

Does the generated HTML support mobile responsive design?

Yes. The tool enables the "Responsive Wrapper" option by default, wrapping the `<table>` in a `<div style="overflow-x:auto;max-width:100%;">` container. When the screen width is less than the table width, the container automatically shows a horizontal scrollbar, preventing the table from breaking the page layout. This option can be turned off in the toolbar.

How are null, boolean, and number values displayed in cells?

The tool does type-aware highlighting: null is shown as gray italic (placeholder text can be customized in the toolbar to `N/A`, `-`, `空`, etc.); boolean true is shown in green, false in red; numbers are shown in blue; plain strings are shown as-is; nested objects in Flatten mode are extracted by path, in other modes they are converted to a JSON string and truncated to 50 characters.

Can the generated HTML code be used directly on a website?

Yes. The output is standard W3C HTML5 table structure (`<table>` / `<thead>` / `<tbody>` / `<caption>`), with CSS output as inline style. It can be pasted directly into any HTML page for standalone use, with no dependency on external CSS or JS. You can also download it as a table.html file.

What's the difference between JSON to HTML and JSON to CSV?

HTML tables are styled visual formats, perfect for embedding into web pages; CSV is plain text data, perfect for importing into Excel / Pandas / databases for data analysis. Both are generated from the same JSON data. We recommend previewing the layout in this tool first, then using the JSON to CSV tool to export the data version.

How can I modify the table header text?

The tool automatically uses the first-level keys of the JSON object as the table header `<th>` content (in Flatten mode, the full dot-separated path is used, e.g. `user.name`). If you want the header to display different text (e.g. Chinese), there are three options: ① Modify the source JSON key names to Chinese directly; ② Manually edit the `<th>...</th>` content in the Code tab after generation; ③ Use sed to batch-replace the generated HTML.

The downloaded table.html looks blank when opened in a browser. What should I do?

The downloaded table.html only contains the `<table>` tag structure (with a possible responsive wrapper `<div>`) — it does not have a complete HTML skeleton (`<html>` / `<head>` / `<body>`). It is designed as a snippet for embedding into existing web pages. You can manually add a complete HTML skeleton using an HTML formatting tool, or paste it directly into the appropriate location in your project page.

The page becomes laggy when generating 1000+ rows. What should I do?

The tool defaults to a 1000-row limit protection, showing "Truncated" if exceeded. If you really need a 5000-row table, raise the "Max Rows" in the toolbar to 10000, but we recommend: ① Split into paginated tables (50 rows per page); ② Use IntersectionObserver for virtual scrolling; ③ Or use dedicated component libraries like TanStack Table / AG Grid for data display scenarios.

Is my data uploaded to a server? How private is it?

Everything runs locally in your browser. All JSON parsing, HTML generation, copy, and download operations happen in your browser via JavaScript, and file reading only happens in the local FileReader. Nothing is sent to any server. You can safely use this tool with sensitive API responses and unreleased business fields — closing the page clears all data.

Troubleshooting

Notice: "Please enter JSON data" or similar error

The left input box is empty or contains only whitespace. Make sure you have pasted valid JSON content, or click "Sample" to load sample data, or click "Upload" to select a .json / .txt file.

Notice: "Unexpected token ... in JSON at position N"

The JSON is malformed. Common causes: ① An extra trailing comma (e.g. [{},{},]); ② Single quotes instead of double quotes; ③ JS object syntax (e.g. {key: value}) instead of JSON ({"key": "value"}). Use a JSON formatting tool to validate and fix it first.

Generated table only has the header, no data rows

The JSON data is an empty array [] or an empty object {}. This tool returns a `<!-- No valid objects found -->` comment for empty arrays. Add at least one object to your source JSON.

Column names are too long in Flatten mode (e.g. user.profile.address.city.country.code)

When the nesting is too deep, we suggest: ① Switch to "Top-level Keys" mode (only takes top-level fields, nested objects become a full JSON column); ② Restructure your source JSON to reduce unnecessary nesting; ③ Use the Reset button in the toolbar to restore default flatten config.

Tailwind class injection has no effect

The tool outputs inline styles by default (e.g. padding, background), which override Tailwind's same-named utility classes. Suggestion: ① Turn off the corresponding toolbar style option (such as zebra striping) before using Tailwind to control background colors; ② Or use PostCSS to remove the inline style attributes from the generated HTML.

Table height is squeezed inside the responsive wrapper

"Responsive Wrapper" makes the outer div's height follow the table by default. If your parent container is a flex layout without a specified height, the child table may be squeezed. Add min-h-0 to the parent container or set the table height.

The downloaded table.html is blank when opened in browser

The downloaded file only contains the <table> snippet (with a possible responsive wrapper <div>), without a complete HTML skeleton (<!doctype html> / <html> / <head> / <body>). It is designed for easy embedding into existing web pages. Use an HTML formatting tool to add the complete skeleton, or paste directly into the appropriate location in your project.

Chinese table header text shows garbled characters

Source JSON keys contain Chinese — make sure the source file itself is UTF-8 encoded. If the JSON is copied from Excel, it may be converted to GBK; use an encoding conversion tool to convert to UTF-8 before pasting.

Want to batch modify generated tables (e.g. replace company logo / change color)

After generation, copy the HTML from the Code tab on the right and use sed / PostCSS / a custom script to batch-replace style attributes. A common command: sed -i '' 's/#f9fafb/#your-color/g' table.html.

Laggy page when generating 1000+ rows

The tool defaults to a 1000-row protection cap. You can adjust maxRows in the toolbar up to 10000, but browsers suffer from a noticeable performance drop when rendering very large DOMs (>1000 nodes). We suggest: ① Split into paginated tables (50 rows per page); ② Use IntersectionObserver for virtual scrolling; ③ Or use dedicated component libraries like TanStack Table / AG Grid for data display scenarios.

History records are lost

History is stored in the browser's localStorage. Clearing browser data, switching to incognito mode, or using a different browser will all cause history to be lost. The tool does not upload history to any server, so it cannot sync across devices.

Cannot see raw data after row limit

The tool defaults to maxRows=1000, exceeding rows are truncated. If your source data is > 1000 rows but you only need the first N rows for preview, set maxRows smaller (e.g. 100) for faster results. For full data, we suggest using Python Faker / Node.js scripts directly.

Glossary

HTML Table
A W3C-standard structured data display element, composed of semantic tags like table / thead / tbody / tr / th / td / caption. The code generated by this tool strictly follows this structure.
JSON Array
A collection of objects wrapped in square brackets [...]. The tool uses each object in the array as a table row; an empty array produces no table (a notice is shown).
JSON Object
A collection of key-value pairs wrapped in curly braces {}. The tool uses each key of the object as a table header and the value as a cell; a single object is automatically wrapped as a single-row table.
Flatten
Recursively expanding nested objects into dot-separated flat key names, e.g. {user:{name:'A'}} → 'user.name'. The tool supports 6-level auto-flatten with a configurable separator.
thead / tbody
The two semantic partitions of an HTML table: thead wraps the header row (th), tbody wraps the data rows (td). The code generated by the tool strictly distinguishes these two parts.
Caption
The table title tag, located in the first row inside the table. The tool supports custom caption text. When enabled, the specified title is shown above the table, which is helpful for SEO and accessibility.
Zebra Striping
A visual pattern where odd and even rows alternate background colors, commonly #fff / #f9fafb. The tool enables this via the "Zebra Striping" checkbox, significantly improving readability for long tables.
Inline Style
Writing CSS directly through the style attribute of an HTML tag, rather than referencing an external stylesheet. The tool outputs all styles as inline style by default, so the code can be used as-is without additional CSS files.
CSS class hook
The tool's differentiated capability: injecting any class string (such as a Tailwind class) on the `<table>` tag, integrating seamlessly with existing CSS frameworks. This is a key upgrade over competitors.
iframe sandbox
The secure sandbox mode of the HTML iframe tag, which can restrict script execution and form submission. The tool uses an iframe with sandbox="allow-same-origin" to preview generated HTML, preventing accidental script execution.
Type-aware highlighting
The tool's differentiated capability: applying different colors based on the JS type of the cell value (null / boolean / number / object / string), making API data debugging more intuitive.
localStorage history
The local key-value storage provided by the browser (capacity ~5-10MB). The tool uses localStorage to persistently save the most recent 200 inputs, which can be quickly restored after a refresh or accidental tab close.
Responsive Wrapper
Wrapping the table in an outer `<div style="overflow-x:auto;max-width:100%;">` so the table automatically gets a horizontal scrollbar on narrow screens. The tool enables this by default; it can be turned off in the toolbar.
Debounce
A frontend performance optimization technique: merging high-frequency event callbacks (like input) into a single execution after the last trigger. The tool sets a 500ms debounce to avoid lag from large file parsing.
W3C HTML5
The HTML standard specification created by the World Wide Web Consortium (W3C). The code generated by the tool conforms to the HTML5 spec and renders correctly in all modern browsers.

Comparison of Three Nesting Modes

The toolbar provides three modes for different nesting scenarios. Choose based on the complexity of your JSON structure:

ModeBehaviorSample ColumnUse Case
Flat (Recommended)Recursively expand nested objects to dot-separated keys (depth ≤ 6)user.name / user.tags.0Real API nested structures like GitHub / Stripe / Notion; you want each field in its own column
Top-level KeysOnly takes the object's first-level keys; nested objects / arrays become a single column JSON stringuser / tagsWhen the nested structure is unstable or too deep (>6 levels); you only care about top-level field overview
StringForce all values to be treated as strings; nested objects are JSON.stringify'd directlyuser (as a JSON blob)Debugging scenarios: preserve the original JSON structure for visual inspection

Toolbar 14 Configurable Options Cheat Sheet

All 14 configurable options in the toolbar and their visual differences, for quick combination selection:

OptionTypeVisual Effect / Behavior
includeIndexcheckboxAdd a # numbered column at the leftmost (incrementing from 1)
stripedcheckboxAlternate odd/even row backgrounds (white / #f9fafb)
borderedcheckbox1px gray border around cells + 2px emphasis line under the header
hovercheckboxLight gray #f9fafb background on row hover
compactcheckboxCell padding reduced from 10px×14px to 6px×8px
responsivecheckboxWrap in overflow-x:auto container; horizontal scroll on narrow screens
flattenModeselectNesting: Flat (Recommended) / Top-level Keys / String
tableClasstextCustom CSS class injected into <table class="...">
nullPlaceholdertextDisplay text for null / undefined cells (blank shows 'null')
maxRowsnumberMaximum generated rows (1-10000), auto-truncate with notice when exceeded
captiontextCustom title text shown above the table (caption-side: top)
indexHeadertextHeader text for the index column (default #)
flattenSeparatortextSeparator for keys in Flatten mode (default ., can change to _ / - etc.)
wrapperClasstextCustom CSS class for the responsive wrapper <div> (advanced)

Type-Aware Cell Highlighting Rules Cheat Sheet

The tool automatically applies different colors based on the JavaScript type of the JSON value for quick data type recognition:

JS TypeDetectionApplied StyleExample Output
null / undefinedval === null || val === undefinedcolor: #9ca3af; font-style: italic; shows placeholder text (customizable)<span style="color:#9ca3af;font-style:italic;">N/A</span>
boolean (true)typeof val === 'boolean' && valcolor: #059669;<span style="color:#059669;">true</span>
boolean (false)typeof val === 'boolean' && !valcolor: #dc2626;<span style="color:#dc2626;">false</span>
numbertypeof val === 'number'color: #2563eb;<span style="color:#2563eb;">42</span>
object / array (Flatten mode)type === 'object' + Flatten mode extracts by pathNested objects extracted by path to atomic valuesuser.name → 'Alice'
object / array (other modes)typeof val === 'object'JSON.stringify then escape and truncate to 50 chars, purple italic + title hover shows full JSON<span style="color:#7c3aed;font-style:italic;" title="...">{"id":1…</span>
stringotherwiseDefault text color #4b5563Jennifer Martinez

Privacy & Security

This JSON to HTML tool runs all JSON parsing, nested flatten, HTML generation, copy, and download operations entirely in your browser via JavaScript. The input JSON data and generated HTML code are not uploaded to any server, nor are they logged, cached, or stored in the cloud. You can safely use this tool with sensitive unreleased API responses and internal business fields — closing the page clears all data.

Authoritative References