How to convert SQL INSERT dumps to CSV or JSON
- Paste a SQL script or open a
.sqldump file containingINSERT INTO … VALUES (…)statements. - If the dump includes multiple tables, select the table you want to extract in Target table.
- Choose CSV or JSON array of objects as the output format.
- Review the extracted table preview, then copy or download the output file.
What SQL syntax is supported?
| Feature | Supported syntax |
|---|---|
| Column discovery | Explicit INSERT INTO tbl (c1, c2) or preceding CREATE TABLE tbl (...) |
| Identifier quoting | "postgres", `mysql`, [sqlserver], or unquoted |
| String literals | Standard 'O''Brien', MySQL 'O\'Brien', SQL Server N'text', Postgres E'line1\nline2' |
| Multi-row inserts | VALUES (…), (…), (…); and multiple separate INSERT statements |
| Special values | NULL, DEFAULT, TRUE, FALSE, and 64-bit numbers |
Limitations
- PostgreSQL
COPY … FROM stdinblocks use tab-separated data rather thanINSERT … VALUES; paste the rows inside aCOPYblock directly into the CSV ⇄ TSV Converter. - Complex SQL expressions inside
VALUES(such as subqueries) are extracted as raw expression text rather than evaluated.
Frequently asked questions
Does this converter execute my SQL statements?
No. It uses a static SQL tokenizer that reads CREATE TABLE column names and INSERT INTO ... VALUES (...) tuples directly in your browser. Arbitrary SQL commands like DROP TABLE or DELETE are never executed.
What if my INSERT statement does not list column names?
If the dump includes a matching CREATE TABLE statement above the INSERT, the converter reads the column names from CREATE TABLE automatically. Otherwise it generates column_1, column_2, and so on.
Are 64-bit IDs and leading zeros preserved?
Yes. Unquoted SQL numbers (like 9007199254740993) are kept as exact digit strings in CSV and emitted as raw JSON numbers without passing through 64-bit IEEE-754 floating-point rounding. Quoted strings like '00142' keep their leading zeros.
Which SQL dialects are supported?
PostgreSQL ("col", 'O''Brien', E'\n'), MySQL and MariaDB (`col`, backslash escapes like \' and \n), SQLite, and SQL Server ([col], N'Unicode'). Multi-row VALUES lists and multiple INSERT statements are combined automatically.
What happens if a SQL dump file contains multiple tables?
The converter detects every table that has INSERT statements and shows a "Target table" selector in the options panel so you can export each table individually.
Last updated .