Skip to main content

HTML Table to JSON: Convert Table Markup to Clean JSON

Paste an HTML <table>, get clean JSON, array of objects or 2D array, type inference, browser-only

  • Runs locally
  • Category Format Converter
  • Best for Turning pasted content or local files into a handoff-friendly format.
Paste HTML containing a <table> on the left, get live JSON on the right. By default the first row (or a <th> row) becomes the object keys and you get an array of objects; turn the header toggle off for a 2D array. Tags inside cells are stripped to text and entities (&amp;, &#39;, &nbsp;) decode to characters. With type inference on, plain numbers become number, true/false become boolean, and blanks become null.
HTML table source
JSON
Paste an HTML table on the left and JSON appears here.

What this tool does

Free HTML table to JSON converter for developers who scrape pages, copy tables out of docs, or pull data from a CMS that only gives you markup. Paste any block of HTML that contains a <table> and the tool reads the <thead>, <tbody>, <tr>, <th> and <td> structure, strips the tags inside each cell down to clean text, decodes entities like &amp; and &nbsp;, and emits pretty-printed JSON. The default output is an array of objects keyed by the first row (or the <th> header row); flip one switch and you get a 2D array instead, which is handy when the table has no real header. Turn on type inference and plain numbers become real JSON numbers, true/false become booleans, and empty cells become null, so the result drops straight into your code without a second cleanup pass. colspan is handled by repeating the value across the merged columns. Multiple tables on one page? Parse just the first or every table at once. Everything runs in your browser, nothing is uploaded, and the parser is plain string matching with no DOM execution, so pasted page source never runs scripts.

Tool details

Input
Text + Numbers + Structured content
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 9 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Format Converter · Developer
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How HTML Table to JSON fits into your work

Use it when the main problem is getting content from one practical format into another.

Conversion jobs

  • Turning pasted content or local files into a handoff-friendly format.
  • Previewing a conversion before you use it in a larger workflow.
  • Cleaning small format mismatches without opening a full editor.

Conversion checks

  • Try a small sample first when the source format is messy.
  • Check character encoding, separators, and line endings after conversion.
  • Keep the source until the converted output has been reviewed.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 Unit Converter Convert between length, weight, temperature, area, volume, speed, time — instant, browser-only Open
  2. 2 Base64 Encoder & Decoder Encode or decode Base64 — text, files, and Data URLs. Runs entirely in your browser. Open
  3. 3 HTML Table to CSV Converter HTML table to CSV converter — paste HTML or full page source, extract all tables, get CSV/TSV/JSON/Excel-ready output with header detection + colspan/rowspan handling. Open

Real-world use cases

  • Turn a scraped page table into seed data

    You scraped a product listing and the only structured part is one big <table> full of <b> tags and &amp; entities. Paste it here, flip on type inference, and you get an array of objects with real numbers and booleans, ready to drop into a seed script or a test fixture. No regex-in-a-loop, no cheerio install for a one-off job.

  • Convert a doc or wiki table for an API mock

    A spec lives as an HTML table in a Confluence export or a Wikipedia article. You need it as JSON to stub an endpoint. Paste the table, let the first row become the keys, and the rows become objects you can serve from a mock server in seconds instead of retyping every field.

  • Lift a table out of an email or CMS field

    A marketing CMS stores a pricing grid as raw HTML and you need it in your front end as data, not markup. Paste the stored HTML, strip the tags to clean text, and copy the JSON straight into your component's props so the table renders from data you control.

  • Sanity-check a table before importing it

    Before you trust a messy table from a third party, paste it and read the JSON. Misaligned columns, stray colspans, and cells that are secretly empty all jump out in the structured output, so you catch the bad row here instead of after it breaks your import.

Common pitfalls

  • Expecting type inference to be on by default. It is off so ids and ZIP codes survive. Turn it on only when you actually want numbers and booleans, and remember it deliberately leaves "1,234" and "$99" as strings because the separator and currency sign mean they are not plain numbers.

  • Assuming the first row is always a header. If your table's first row is data (a quote table with no labels), keying on it invents nonsense keys. Switch to 2D array mode or turn the header switch off so you get a clean array of arrays instead.

  • Forgetting that only the first table is read by default. If you pasted a whole page with navigation and footer tables, you may get the wrong one. Either paste just the table you want, or tick "Parse every table" and pick the right element from the resulting array.

Privacy

Every step runs as plain JavaScript inside your browser tab: finding the <table>, reading the rows, cleaning each cell, and serializing the JSON. The parser uses string matching rather than the live DOM, so the pasted HTML is never assigned to the document and no inline script, tracking pixel, or image request hidden in that source ever fires. Your HTML and the JSON it produces never leave the page and nothing is logged. The pasted input is also kept out of the shareable URL on purpose, since scraped page source often carries emails, session tokens, or cookie banners you would not want in a link. A link you copy round-trips only your option choices, never the table data.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-06-14