Want to convert HTML table to SQL file?
Try Withdata Data File Converter, a desktop HTML to SQL converter for Windows, MacOS, and Linux, Convert HTML table to SQL, Easy and Fast.
- Can run in GUI mode, Step by Step, just a few mouse clicks.
- Can run in Command line, for Scheduled Tasks and Streams.
- Convert files locally and privately, avoid uploading large HTML file(s) to online services.
- Support Windows, Linux, and macOS.
Download Withdata DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit
Convert HTML table to SQL
Choose HTML file -> Set SQL file -> Convert HTML table to SQL
“Start a New Convert” for “HTML to SQL”.
Select From “File” “HTML” To “File” “SQL”.
1. Open source HTML file.
Support large HTML file ( > 4GB ).
Source HTML file’s content is like this:
2. Config target SQL file.
3. Set rows options.
4. Convert HTML table to SQL.
After converting, you can view the output SQL file.
More about HTML to SQL converter
Download Withdata DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit
See Video: Convert html table to SQL file in a few clicks
See also:
HTML → SQL reference
Type mapping
| Value kind | in HTML | in SQL |
|---|---|---|
| Int | <td>1234</td> | INT |
| Bigint | <td>9007199254740993</td> | BIGINT |
| Decimal | <td>1234.56</td> | DECIMAL(p,s) |
| Float | <td>1.234e+10</td> | DOUBLE PRECISION |
| Text | <td>text</td> | VARCHAR(n) |
| Long text | <td>multi-line text</td> (entities for & <) | TEXT / CLOB |
| Date | <td>2026-09-18</td> | DATE |
| Datetime | <td>2026-09-18 14:30:00</td> | TIMESTAMP |
| Binary | not representable in a cell | BLOB / BYTEA |
| Boolean | <td>true</td> | BOOLEAN / SMALLINT |
| JSON | <td>{"a":1}</td> (quotes escaped) | JSON / TEXT |
Dialect differences
Both HTML and SQL are file formats, so what differs below is how each one chooses to represent a value.
| Property | in HTML | in SQL |
|---|---|---|
| identifiers | Attribute values in quotes; entities for reserved characters | Two competing conventions: single-quoted literals and diale... |
| dates | Whatever text was rendered | Depends on the dialect: DATE literals, TO_DATE(), or plain ... |
| binary | data: URIs inside src attributes | Dialect-specific: X-quoted literal, 0x hex, or decode() |
| separator | Tags, not delimiters | Statement terminators (;) |
| encoding | Declared in a meta charset tag or the HTTP header | No declaration |
| typing | None | Types belong to the target database, and they differ betwee... |
| shape | Free form; tables are row/column structures inside markup | Statements; a dump usually means CREATE TABLE plus INSERT rows |
| ceiling | No formal limit | No formal limit, but a single INSERT statement has to fit i... |
Convert HTML to SQL the easy way
Use the HTML to SQL converter — an offline desktop app for Windows, macOS and Linux. Nothing to upload, large files and batch runs supported (free trial).