Convert Table to Text

Convert HTML tables or Markdown tables into CSV, JSON, or SQL Insert statements.

Settings

AUTO-DETECT

Statistics

Load a table to see stats
Input Table
Converted Result

Convert Table to Text

The Convert Table to Text tool is a powerful utility for developers and data analysts. It allows you to instantly extract data from static HTML tables or Markdown files and convert it into clean, structured formats like CSV, JSON, SQL, or even Markdown/ASCII tables.

What is a Table to Text Converter?

The Convert Table to Text tool is a specialized utility designed to extract tabular data from static sources like HTML files, websites, or Markdown documents. It parses the structure and converts it into usable formats like CSV for spreadsheets, JSON for applications, or SQL for databases.

Why use a Table Converter? Manually copying data from a table on a webpage often results in messy formatting, broken columns, and missing headers. A converter automates this process, ensuring you get clean, structured data in seconds without writing any parsing scripts yourself.

Features

Smart Detection

We analyze the first row to automatically detect headers and define column keys for your JSON or CSV.

SQL Generator

Generate thousands of valid `INSERT` statements instantly. Perfect for migrating wiki data to a production database.

Client-Side

100% secure. Data is processed entirely in your browser—no uploads, no latency, and no size limits.

How to use

  1. Input: Paste your HTML `<table>` code or Markdown table text into the input box. You can also upload a file.
  2. Select Format: Choose your desired output: **CSV** for Excel, **JSON** for APIs, **SQL** for databases, or **Markdown/ASCII** for documentation.
  3. Customize: If using CSV, select your preferred delimiter (comma, semicolon, etc.).
  4. Copy/Export: Click "Copy" to grab the text, or use "Export as Code" to get a ready-to-use snippet for JS, Python, or PHP.

Example - Convert Table

Input (HTML)
<tr><td>User_1</td><td>Active</td></tr>
Result (SQL)
INSERT INTO exported_table VALUES ('User_1', 'Active');

Frequently Asked Questions

How do I convert an HTML table to CSV?

Simply copy the <table>...</table> code from your source (viewport source or inspect element) and paste it into the input box. Select "CSV" from the settings, and our tool will instantly parse rows and columns into a standard CSV format ready for Excel.

Does this work with Markdown tables?

Yes! We support GitHub Flavored Markdown tables. Just paste your text table (using | pipes), and we will intelligently detect headers and data rows, even if the spacing is messy.

Can I generate SQL INSERT statements?

Absolutely. This is a favorite feature for backend devs. Choose the "SQL" output option, and we will generate valid INSERT INTO table_name (...) VALUES (...) statements for every row, handling string escaping automatically.

Is my data secure?

100% secure. This tool runs entirely in your browser using JavaScript. No table data is ever sent to our servers, so you can safely parse sensitive internal dashboards or client data.

Can I convert a file instead of pasting text?

Yes. You can upload .html, .md, or .txt files directly. The tool will read the file contents and attempt to find and parse the first table it encounters.

How does it handle nested tables or complex attributes?

Currently, the parser focuses on the main parent table structure. It extracts text content from cells (td, th), ignoring styling attributes, classes, and complex nested layouts to give you the clean raw data.

Can I use the output in Python or JavaScript?

Yes. Use the "Export As Code" feature to get the result formatted as a variable string for Python, JavaScript, or PHP, saving you from manually escaping quotes and newlines.

Is there a limit on table size?

There is no hard limit effectively other than your browser's memory. We have tested it with tables containing thousands of rows without issues. It is optimized for performance.

Can I generate a Markdown table from HTML?

Yes! Select "Markdown" as your output format. This is perfect for taking an HTML table and quickly converting it into a format suitable for GitHub Readmes or documentation files.

How do I use a custom CSV delimiter?

When you select "CSV" as the output format, a new dropdown menu will appear. You can choose between Comma (,), Semicolon (;), Tab (\t), or Pipe (|) to format your data exactly how your spreadsheet software needs it.

What is the ASCII Table output used for?

The ASCII Table output generates a plain-text grid using characters like +, -, and |. This is ideal for displaying tabular data in terminal applications, code comments, or plain text emails where rich formatting isn't available.