SQL to CSV Converter
A .sql file is a script for rebuilding a database, not something a spreadsheet can open. Upload the dump and get the rows from its INSERT statements as CSV, without installing or restoring a database first.
Data Converter
or drop CSV, TSV, TXT … files here ·
Max 95 MB per file· Up to 20 files· Deleted after 30 minutes
Files are processed on our servers and deleted after 30 minutes.
Character that separates columns in CSV and text files, for both reading and writing. Auto detects it from the input and writes commas.
UTF-8 works for every language. Choose UTF-8 with BOM if Excel on Windows shows garbled accents or Asian characters when opening the CSV.
Excel, ODS and Numbers input: convert the first sheet only, or every sheet (one CSV per sheet in a ZIP, or one JSON key per sheet).
Name of the sheet tab in the new spreadsheet, up to 31 characters.
Array of objects uses column names as keys for every row; array of arrays is more compact and keeps the header as the first array.
Name of the outer element that wraps all rows; each row becomes a <row> inside it.
Used in CREATE TABLE and INSERT statements. Letters, digits and underscores only.
Quoting and column types differ slightly between databases; pick the one you will import into.
Rewrite date cells in one format. ISO (2026-10-18) is safest for databases and code; keep leaves them as they appear in the source.
How to use this tool
- 1
Upload the .sql dump
Add the file exported by phpMyAdmin, mysqldump, SQLite or SQL Server, up to 95 MB. A compressed .sql.gz backup has to be extracted first.
- 2
Check the CSV settings
Delimiter is Comma and Dates is set to ISO, so a value like 2026-10-18 reads the same in every program. Choose Semicolon if your Excel uses a comma as the decimal mark.
- 3
Convert to CSV
Press Convert to CSV and open the result in Excel, Google Sheets or any tool that imports comma-separated values.
How do I convert a SQL file to CSV?
Upload the .sql dump and press Convert to CSV. Each row inside an INSERT statement becomes a line of the CSV, with the table's column names as the header.
Opening a SQL dump as a spreadsheet
SQL dates back to IBM research in the 1970s and became an ANSI standard in 1986 and an ISO standard the year after, which is why every relational database can write its contents as a script of SQL statements. Those scripts, called dumps, are how hosting control panels back up a WordPress or shop database, how developers hand over data, and how many apps export everything at once.
Opening one in a text editor shows the problem: thousands of values packed into parentheses on very long lines, with quotes and escapes everywhere. A SQL to CSV conversion unpacks those values into rows and columns so you can search old orders, count customers per country or hand a table to someone who works in Excel. To go straight to a workbook instead, choose XLSX under Convert to.
Which SQL dumps convert to CSV directly
| Exported with | How rows are written | Ready to convert |
|---|---|---|
| mysqldump, phpMyAdmin | INSERT INTO with many value groups per statement | Yes |
| SQLite .dump command | One INSERT INTO per row | Yes |
| SQL Server Generate Scripts, schema and data | INSERT statements with [bracketed] names | Yes |
| pg_dump, default plain format | COPY … FROM stdin blocks of tab-separated text | Export again with --inserts |
| Any tool, schema only | CREATE TABLE without data | No rows to convert |
- SQL dumpdatabase dump · .sql backup
- A plain-text file of SQL statements that recreates a database: CREATE TABLE lines describe each table's columns, and INSERT lines carry the rows. Restoring it means running the script in a database; converting it means reading the INSERT values without running anything.
PostgreSQL is the one to watch. pg_dump writes table data as COPY blocks by default, which are fast to restore but are not INSERT statements; run it again with the --inserts or --column-inserts option to get a file that converts cleanly. For data you only want to analyze rather than edit, CSV to Parquet is a natural next step once you have the CSV.
SQL and CSV format facts
SQL
SQL script
An SQL file is a plain-text script of Structured Query Language statements, such as CREATE TABLE and INSERT, that a database runs in order. It is commonly used for database backups, migrations and sharing sample data. The language itself is an ISO standard, but MySQL, PostgreSQL, SQLite and SQL Server each have their own dialects, so scripts often need small changes between systems. Any text editor can open an SQL file, and a database client is needed to execute it.
- Compression
- –
- Transparency
- –
- Animation
- –
- Introduced
- –
CSV
Comma-separated values
CSV is a plain-text format for tables in which each line is a row and commas separate the columns. It has been used since the early days of computing and is described in RFC 4180, though many variants use semicolons or tabs and different text encodings. Nearly every spreadsheet, database and analytics tool can import and export it, which makes it the default format for moving data between systems. CSV stores only values, with no formulas, formatting, multiple sheets or data types.
- Compression
- –
- Transparency
- –
- Animation
- –
- Introduced
- –
SQL dumps go to CSV when the data inside a database backup is needed by someone without a database: a site owner reading old orders, an analyst checking a client's export, or a developer pulling one table out of a hosting backup.
SQL to CSV questions
Do I need MySQL installed to open a .sql file as CSV?
No. The usual route is to install a database server, import the dump and export each table again, which takes time and some command-line work. The converter reads the INSERT statements directly and writes the values as rows, so all you need is a browser.
Where do the column names in the CSV come from?
From the CREATE TABLE statement for that table, or from the column list written in the INSERT statements when the dump includes one. If neither is present, the values are still converted, and you add the header line yourself.
What do I get from a dump with dozens of tables?
One CSV per table, delivered together in a ZIP, because a CSV file can only hold one table. Tables with no INSERT statements, such as empty logs or caches, produce no file.
My backup ends in .sql.gz. Can I upload it?
Extract it first, since the converter reads the plain .sql text. The unzip online tool opens .gz files in the browser; then upload the .sql it gives you.
Should I upload a database dump that contains customer data?
Only the part you need. Dumps often hold email addresses, password hashes and order history, so export just the relevant table where you can. Uploaded files are deleted 30 minutes after processing, as described in the privacy policy.
Can the CSV be turned back into SQL later?
Yes. After editing in a spreadsheet, CSV to SQL writes CREATE TABLE and INSERT statements for MySQL, PostgreSQL, SQLite or SQL Server, with a table name you choose.