How to Convert an HTML Table to JSON
Turning a table on a web page into usable data usually means tedious copying or a scraping script. This converter does it in one step. Paste the HTML — a single table or a whole page — and a real DOM parser reads it exactly as a browser would. The header cells become object keys and each body row becomes an object, giving you the array-of-objects shape that most APIs, JavaScript and data tools expect. Turn on type detection and numbers, booleans and null become real JSON values instead of strings. Prefer positional data? Switch to an array of arrays. If the page has several tables, choose the one you want from a dropdown, then pretty-print or minify and copy or download. Everything runs in your browser, so nothing is uploaded.
Paste your HTML
Paste a table or a full page, or load the sample; it's parsed locally with nothing uploaded.
Choose the options
Toggle type detection, output shape and formatting, and pick a table if there are several.
Copy or download
Grab the JSON with one tap or save it as a .json file.
HTML Tables vs JSON — What's the Difference?
HTML table markup
A set of table, tr, th and td elements a browser renders as a grid. It's built for display, mixing content with structure and styling, so it isn't directly usable as data in code.
JSON — JavaScript Object Notation
A lightweight data format of objects and arrays with real types, understood everywhere. Converting an HTML table to JSON gives you clean, typed records your code and APIs can use directly.
Common Use Cases
Scrape a web table
Pull a table from a page's source into JSON for use in code.
Feed an API or app
Get the array-of-objects shape most APIs and front ends expect.
Data for JavaScript
Turn a rendered table into a JSON array you can map over directly.
Config & seed data
Convert an HTML table of settings into JSON for your app.
Report extraction
Capture an HTML report table as structured JSON for analysis.
Testing fixtures
Produce JSON records from example tables for tests.
Migrations
Move tabular content out of an HTML page into a JSON-based store.
Quick extraction
A fast, no-install way to get a table's data as JSON.
Tips & Best Practices
Use th for clean keys
Tables with proper th header cells give accurate object keys automatically.
Pick the right table
If several tables exist, use the dropdown to select exactly the one you need.
Objects vs arrays
Use objects when you want named fields; switch to arrays for compact positional data.
Type detection for code
Keep it on so numbers and booleans are usable directly; turn it off to preserve exact strings.
Watch merged cells
Cells spanning rows or columns can shift alignment; check the output if your table uses them.
Minify for transport
Turn off pretty-print for compact JSON when sending it to an API or storing it.
Troubleshooting
It says no table was found
The HTML must contain a <table> element. If your data is a list or divs styled as a table, it won't be detected.
Keys look like column1, column2
The first row had no usable header cells. Add a th header row, or the tool falls back to generated keys.
Numbers stayed as strings
Enable type detection. Values with leading zeros or extra characters are kept as strings to avoid data loss.
Columns look misaligned
The table probably uses rowspan or colspan. Merged cells don't map cleanly to a flat row of values.
Frequently Asked Questions
How do I convert an HTML table to JSON for free?
Paste your HTML above and JSON appears instantly as an array of objects. Copy it or download a .json file — free, no signup.
Can I paste a whole web page?
Yes. The parser finds every table in the markup and lets you pick which one to convert.
What JSON shape do I get?
By default an array of objects, keyed by the header names. You can switch to an array of arrays for positional data.
How does it find the header row?
Header cells (th) in the first row become the object keys. If there are none, generated keys like column1 are used.
Does it detect data types?
Yes. With type detection on, numbers, booleans and null become real JSON types instead of strings.
What if the page has several tables?
A dropdown appears so you can choose exactly which table to convert.
Does it strip HTML inside cells?
Yes. Inner markup is removed and the visible text is trimmed, so values are plain.
Can I keep values as strings?
Yes. Turn off type detection to preserve every value exactly as text, useful for IDs with leading zeros.
Can I minify the JSON?
Yes. Turn off pretty-print for compact JSON, ideal for sending to an API or storing.
What about merged cells?
Cells with rowspan or colspan don't map cleanly to a flat row, so alignment may shift for those tables.
Is my data sent to a server?
No. Everything happens inside your browser, so your data never leaves your device.
Can I download the result?
Yes. Save the output as a .json file, or copy it straight to your clipboard.
How large a table can it handle?
It comfortably converts tables with many hundreds of rows, all within your browser.
Does it need a full HTML document?
No. You can paste just a <table> fragment; a full page works too.
Can I convert to CSV instead?
Yes — use our HTML to CSV converter for spreadsheet-ready output.
Does it preserve Unicode?
Yes. Any Unicode characters in your table are preserved in the JSON output.
Does it work on phones?
Yes, in any modern browser on Windows, Mac, Android or iPhone with nothing to install.
Is this converter really free?
Completely free, forever — no account, no ads and no premium wall.
100% free · No signup · Processed in your browser · Data never sent
Last updated: August 2026 · FlipMyFormat HTML to JSON Converter
Written and maintained by the FlipMyFormat team · Runs entirely in your browser