📊 HTML Table to JSON Converter

Convert HTML tables to structured JSON data instantly

Paste any HTML table. Supports <table>, <thead>, <tbody>, <tr>, <th>, <td>

📌 Example Output

[
  {
    "name": "John Doe",
    "age": 28,
    "city": "New York",
    "occupation": "Engineer"
  },
  {
    "name": "Jane Smith",
    "age": 34,
    "city": "Los Angeles",
    "occupation": "Designer"
  }
]

About HTML Table to JSON Conversion

Convert HTML tables to JSON format for use in APIs, databases, JavaScript applications, and data processing. This tool extracts tabular data and structures it as clean JSON objects.

Common Use Cases

🌐 Web Scraping

Extract data from HTML tables on websites and convert to JSON for analysis or storage.

📱 API Development

Convert static HTML tables to JSON endpoints for mobile apps and web services.

🗄️ Database Import

Transform HTML tables into JSON format for MongoDB or other NoSQL databases.

📊 Data Analysis

Convert tabular data to JSON for processing with pandas, JavaScript, or analytics tools.

HTML Table Structure

Basic Table

<table>
  <tr>
    <th>Name</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>John</td>
    <td>25</td>
  </tr>
</table>

With Thead/Tbody

<table>
  <thead>
    <tr><th>Name</th></tr>
  </thead>
  <tbody>
    <tr><td>John</td></tr>
  </tbody>
</table>

JSON Output Format

// Array of objects (one per row)
[
  {
    "column_name_1": "value1",
    "column_name_2": "value2",
    "column_name_3": "value3"
  },
  {
    "column_name_1": "value4",
    "column_name_2": "value5", 
    "column_name_3": "value6"
  }
]

Features

  • Multiple tables - Handles multiple tables in one HTML document
  • Smart headers - Uses th tags or first row as column names
  • Auto type detection - Converts numeric strings to numbers
  • Clean column names - Formats headers as valid JSON keys
  • Pretty print - Formatted or minified JSON output
  • Download option - Save as .json file

💡 Pro Tip

Use the "First row as header" option when your table uses <td> for headers. Toggle "Pretty print" for readable JSON during development, or disable it for minified output perfect for production APIs.

Explore More Helpful Tools