Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

HTML Table to JSON Extractor

Paste HTML containing a table and instantly extract the data as a clean JSON array

Your files never leave your browser
HTML Input0 chars, 0 lines
JSON Output0 items
Ready·

Paste any HTML containing <table> elements and get structured JSON back in one click. Headers are detected from <th> tags automatically, numbers and booleans get typed correctly, and pages with multiple tables let you pick which one you want.

Handy when you’re scraping data from old report pages, pulling inventory out of admin panels, or grabbing grades off a university portal. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste HTML
→
Parse Tables
→
JSON Output

Your HTML gets fed into the browser’s built-in DOMParser. It scans for <table> elements, pulls out headers from <th> tags (or falls back to the first row), then walks each <tr> to build row objects. The result is a JSON array where each row is a key-value object — ready to drop into an API call, a database import, or a script.

Examples

Simple contact list

You copied a two-column staff directory from an intranet page.

INPUT
<table> <tr><th>Name</th><th>Email</th></tr> <tr><td>Ana Torres</td><td>[email protected]</td></tr> <tr><td>Raj Patel</td><td>[email protected]</td></tr> </table>
OUTPUT
[ {"Name":"Ana Torres","Email":"[email protected]"}, {"Name":"Raj Patel","Email":"[email protected]"} ]

Product table with prices and stock counts

An e-commerce admin panel exports inventory as HTML. You need the numbers typed correctly for a script that checks low-stock items.

INPUT
<table> <thead><tr><th>SKU</th><th>Price</th><th>Stock</th></tr></thead> <tbody> <tr><td>WDG-441</td><td>29.99</td><td>182</td></tr> <tr><td>BLT-009</td><td>7.50</td><td>0</td></tr> </tbody> </table>
OUTPUT (Auto-type ON)
[ {"SKU":"WDG-441","Price":29.99,"Stock":182}, {"SKU":"BLT-009","Price":7.50,"Stock":0} ]

Multi-table page — grabbing schedule + grades

A university portal page has the class schedule in one table and final grades in another. You want both as structured data for a personal dashboard project.

INPUT
<table> <tr><th>Course</th><th>Day</th><th>Time</th></tr> <tr><td>CS 201</td><td>Mon</td><td>9:00</td></tr> </table> <table> <tr><th>Course</th><th>Grade</th></tr> <tr><td>CS 201</td><td>A-</td></tr> </table>
OUTPUT (All Tables)
{ "Table 1": [ {"Course":"CS 201","Day":"Mon","Time":"9:00"} ], "Table 2": [ {"Course":"CS 201","Grade":"A-"} ] }

Who Uses This

👨‍💻 Developers

Pull table data from legacy pages into JSON for API mocking or database seeding.

📊 Data Analysts

Grab financial or statistical tables from reports and load them into Python or R scripts.

🎓 Students

Extract grade tables or course schedules from university portals for personal tracking apps.

📋 Project Managers

Convert status tables from Confluence or SharePoint pages into JSON for dashboard integrations.

Common Mistakes

Pasting a page without any <table> tag

If the page uses <div>-based layouts styled to look like tables, the parser won’t find anything. Check the source — you need an actual <table> element in the HTML.

Leaving Auto-type on when IDs look like numbers

A column of ZIP codes like "07102" becomes 7102 with auto-typing. Turn it off when leading zeros matter — product codes, postal codes, phone numbers.

Expecting nested tables to merge into one

A table inside a table cell is treated as a separate table, not flattened into the parent. If you see extra tables in the selector, this is usually why. Pull each one individually.

Technical Details

Frequently Asked Questions

How do I convert an HTML table to JSON?

Paste the HTML that contains your table into the input box and click Extract. The tool reads the <table> structure, identifies headers, and outputs each row as a JSON object. You can copy the result or download it as a .json file.

Does this work with tables that don’t have header rows?

Yes. If there are no <th> elements, the first row is used as headers by default. The keys in your JSON objects will match whatever text is in that first row. You can also switch to "array of arrays" format if you’d rather skip named keys entirely.

Can I extract multiple tables at once?

Absolutely. When the parser finds more than one table, a dropdown appears so you can pick a specific one or choose “All Tables.” Selecting all wraps each table’s data under its own key in a single JSON object.

Is my data sent to a server?

No. The conversion runs entirely in your browser using JavaScript. Nothing is uploaded, stored, or transmitted. You can disconnect from the internet and it still works.

What’s the difference between “array of objects” and “array of arrays”?

Array of objects gives you [{"Name":"Ana","Age":30}] — each row is a keyed object. Array of arrays gives you [["Name","Age"],["Ana","30"]] — plain lists with headers as the first item. Objects are better for APIs. Arrays are smaller and simpler for spreadsheet imports.

Share: