HTML Table to JSON
Convert HTML tables to JSON format instantly. Extract table data with headers as keys. Support for complex tables with merged cells. Download or copy to clipboard.
Loading tool...
What is HTML Table to JSON?
HTML Table to JSON Converter extracts table data from HTML markup and converts it to JSON format. It handles complex tables with merged cells and multiple header rows.
Key Benefits
- Auto header detection
- Merged cells support
- JSON export
- Data extraction
Common Use Cases
- β’Web scraping
- β’Data migration
- β’Report parsing
- β’Table analysis
How to Convert HTML Tables to JSON
- Paste HTML: Paste your HTML containing <table> tags, or paste an entire webpage source.
- Select Table: If multiple tables exist, choose which one to convert from the dropdown list.
- Configure Headers: Specify whether the first row should be treated as column headers or generate automatic keys.
- Handle Merged Cells: Choose how to handle colspan/rowspan - duplicate values or single entry.
- Export JSON: Copy the JSON output or download as a .json file for use in your application.
Key Features
- Multiple Table Detection: Automatically detects and lists all tables in HTML input.
- Header Configuration: Choose whether to use first row as headers or generate automatic keys.
- Merged Cell Handling: Properly handles colspan and rowspan attributes in various modes.
- Data Type Detection: Automatically detects and converts numbers, booleans, and null values.
- JSON Formats: Export as array of objects or array of arrays.
- Clean Output: Removes HTML tags and entities from cell content.
Frequently Asked Questions
How does it handle merged cells?
Merged cells (colspan/rowspan) are detected and the value is either duplicated across affected cells or represented as a single entry depending on the conversion mode.
What if my table has no headers?
You can specify whether the first row should be treated as headers. If no headers exist, the tool can generate keys like column1, column2, etc.
Can I extract from a full HTML page?
Yes! Paste the entire HTML page source. The tool will find all <table> elements and let you choose which one to convert.
What JSON format is generated?
Typically an array of objects, where each object represents a row with keys from table headers. You can also choose array-of-arrays format.