Skip to content

SQL to CSV Converter: INSERT Rows to a Table

Drop a .sql file or paste SQL and its largest table opens as CSV; nothing is uploaded.

Processed on your device. Nothing is uploadedHow to check

Try a sample file:

You can also paste CSV or JSON text with Ctrl+V (⌘+V on a Mac).

Your file is opened in this browser tab only: it is never uploaded or stored anywhere, and it is gone when you close the tab.

  • CSVView and edit.sql
Paste text instead

Pasted text stays in this tab and is never sent anywhere.

Convert SQL to CSV in your browser: drop a .sql file or paste CREATE TABLE and INSERT statements, and they run in a SQL engine inside this page. The table with the most rows opens in the CSV viewer to check, edit and download. MySQL dumps are tidied first: backtick quotes, ENGINE= and AUTO_INCREMENT. Nothing is uploaded, and no database server is involved.

Why use SQL to CSV

  • Private

    Your file is opened by your own browser and never sent to a server, so nobody else sees it.

  • MySQL dumps tidied

    Backtick quotes, ENGINE= and AUTO_INCREMENT are adjusted before the statements run.

  • Works offline

    After you have used it once, it keeps working without an internet connection.

How it works: convert SQL to CSV

  1. Open or paste your SQL

    Drop a .sql file, choose it, paste SQL into the paste box, or try one of the samples.

  2. The statements run in your browser

    CREATE TABLE and INSERT statements run in a SQL engine inside your browser. The table with the most rows becomes the CSV.

  3. Check and edit

    The table opens in the CSV viewer: sort, filter, edit cells and undo before you save.

  4. Download

    Download saves a .csv file; the viewer can also save it as Excel, Markdown, HTML or SQL.

What the SQL to CSV converter handles

  • Input: a .sql file or pasted SQL.
  • Statements: CREATE TABLE and INSERT, run by a SQL engine in your browser.
  • MySQL dumps: backtick quotes, ENGINE= and AUTO_INCREMENT tidied first.
  • Several tables: the one with the most rows becomes the CSV.
  • Output: a table in the CSV viewer, saved as CSV, Excel, Markdown, HTML or SQL.

SQL to CSV: what it can't do

  • Stored procedures, PostgreSQL COPY ... FROM stdin blocks and other dialect-specific syntax are not supported; an error is shown.
  • Only one table becomes the CSV: the one with the most rows.

SQL to CSV: questions and answers

Is my file uploaded?
No. The statements run inside your browser on your device; nothing is sent to a server, and pasted SQL stays in this tab.
Which table becomes the CSV?
The table with the most rows after all the statements have run. Its columns come from its CREATE TABLE statement.
Does it work with a MySQL dump?
Yes for tables and INSERT statements. Backtick quotes, ENGINE= and AUTO_INCREMENT are tidied before the dump runs.
Does it work with a PostgreSQL dump?
INSERT statements work, but COPY ... FROM stdin blocks are not supported and show an error. Export the data as INSERT statements instead (pg_dump --inserts).
Is a database server needed?
No. A built-in SQL engine runs inside this page, so there is nothing to install or connect to.
What happens when a statement fails?
The page shows the error instead of a table. Stored procedures and other syntax specific to one database are the usual cause.
How do I convert a SQL file to CSV?
Run the SQL file's CREATE TABLE and INSERT statements in a database, then export the table as CSV. OpenAnyDoc does both in your browser: open the .sql file or paste the statements, and the table with the most rows opens in the CSV viewer, ready to download, with no database server and no upload.

Why it's private: your files never leave your browser

Most online viewers upload your file to a server, so a copy of it leaves your device. OpenAnyDoc works the other way round: your browser reads the file and draws it on your screen. Nothing is uploaded, there is no account, and the file is gone from memory when you close the tab, so there is nothing for us to store, see or lose.

How we tell you about new features

Announcements are based on the release date shown to everyone, and nothing is stored on your device or sent anywhere.