---
title: "HTML Table to JSON"
description: "Convert HTML tables to JSON format instantly. Extract data from HTML table elements and transform them into structured JSON arrays or objects. Perfect for web scraping and data extraction."
url: https://findutils.com/convert/html-table-to-json/
category: convert
---

# HTML Table to JSON

Convert HTML tables to JSON format instantly. Extract data from HTML table elements and transform them into structured JSON arrays or objects. Perfect for web scraping and data extraction.

**Use this tool:** [HTML Table to JSON](https://findutils.com/convert/html-table-to-json/)

## Programmatic access

- REST id `html-table-to-json`: POST https://api.findutils.com/api/tools/html-table-to-json/execute (reference: https://findutils.com/api/html-table-to-json/)
- MCP tool `html_table_to_json` on https://mcp.findutils.com (reference: https://findutils.com/mcp/html-table-to-json/)

## Why Convert HTML Tables to JSON?

Converting HTML tables to JSON makes data more portable and easier to work with in JavaScript applications. JSON format is ideal for APIs, data storage, and programmatic manipulation of tabular data extracted from web pages.

## Tips for Best Results

- Use browser developer tools (F12) to inspect and copy the exact table HTML, including the opening and closing table tags.
- Clean up any inline styles or class attributes before converting if you want minimal, readable JSON output.
- For tables without explicit header rows, switch to Array of Arrays format to avoid auto-generated column names.
- If your table uses colspan or rowspan, simplify the structure first for the most accurate conversion.
- Combine this tool with the JSON Formatter to pretty-print and validate your output before using it in production.

## Frequently Asked Questions

### What HTML elements are supported?

This tool supports standard HTML table elements including table, tr, th, and td. It can handle tables with or without header rows and processes both th and td cells.

### What is the difference between array of objects and array of arrays?

Array of objects creates JSON where each row is an object with key-value pairs (keys from headers). Array of arrays creates a simple 2D array where each row is an array of values.

### Can I convert tables from websites?

Yes! Simply copy the HTML table code from a website (using browser developer tools) and paste it into this tool. It will extract all the data into JSON format.

### What happens if my table has no headers?

If there are no headers or you uncheck the header option, the tool will generate column names automatically (column1, column2, etc.) for object format, or use raw arrays.

### Is my data secure?

Yes, all processing happens locally in your browser. Your HTML data is never sent to any server, ensuring complete privacy.

### Can I convert multiple tables at once?

Currently, the tool converts one HTML table at a time. If your HTML contains multiple tables, paste each one separately to get clean JSON output for each table.

### How do I get the HTML code of a table from a website?

Right-click on the table in your browser, select Inspect or Inspect Element, find the table tag in the developer tools, right-click it, and choose Copy > Copy outerHTML. Then paste it into this tool.

### Does this tool handle nested tables?

The tool processes the outermost table structure. Nested tables within cells are treated as text content. For best results, extract and convert nested tables separately.

### What is the maximum table size this tool can handle?

Since all processing happens in your browser, the limit depends on your device memory. In practice, tables with thousands of rows and dozens of columns convert without issues on modern devices.

### Can I use this tool for web scraping workflows?

Absolutely. This tool is ideal for extracting structured data from HTML tables you have already retrieved. Paste the table HTML, convert to JSON, and use the output in your scripts, APIs, or databases.

## Related Tools

- [JSON to CSV](https://findutils.com/convert/json-to-csv/)
- [JSON Formatter](https://findutils.com/developers/json-formatter/)
- [JSON to Markdown Table](https://findutils.com/convert/json-to-markdown-table/)
- [Markdown Table Generator](https://findutils.com/text/markdown-table-generator/)
- [JSON to TypeScript](https://findutils.com/developers/json-to-typescript/)
- [JQ Playground](https://findutils.com/developers/jq-playground/)
- [HTML Formatter](https://findutils.com/developers/html-formatter/)
