Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsSQL to JSON ConverterSQL to CSV Converter

SQL to CSV Converter

dev

Turn INSERT statements or a .sql dump into a CSV file that opens in Excel

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 17 Oct 2026.

Somebody sent a .sql file and you only need the data in a spreadsheet. Open the dump or paste the INSERT statements: every table in it is found, and the one you pick comes out as CSV with a header row, quoted where a value holds a comma or a line break, ready for Excel or Google Sheets. Dumps from mysqldump, pg_dump and sqlite3 all work, and nothing is uploaded.

Next:
  • JSON Formatter & Validator Format, validate, minify and sort JSON with exact error positions
  • JSON to SQL Converter JSON to CREATE TABLE and INSERT statements for PostgreSQL, MySQL, SQLite or SQL Server

How to use SQL to CSV Converter

1

Paste or type your input.

2

Choose the options you need.

3

Press Ctrl+Enter, then copy or download.

How SQL to CSV Converter works

A .sql file is the most common way data gets handed over, and the least convenient one to read when you have no database to load it into. This page reads the data straight out of the SQL text.

Source What it looks like Read as
mysqldump INSERT INTO t VALUES (...),(...); with backslash escapes Rows, MySQL escapes
pg_dump (default) COPY public.t (a, b) FROM stdin; tab-separated lines, then \. Rows, \N as null
pg_dump --inserts INSERT INTO public.t VALUES (...); Rows
sqlite3 .dump INSERT INTO "t" VALUES(...); Rows
Hand-written SQL INSERT INTO t (a, b) VALUES (...); Rows

How it was checked. Real dumps were made by pg_dump 17 in three styles and by SQLite's own dumper, and each reads back to exactly the rows those databases return for the same tables. The SQL written by the JSON to SQL Converter reads back as PostgreSQL stored it, too. Nothing you open is uploaded.

The rest of the article, and all 6 questions about SQL to JSON Converter, are on the SQL to JSON Converter page.

Frequently asked questions

How do I convert SQL INSERT statements to JSON?

Paste the statements or open the .sql file. Each INSERT INTO table VALUES row becomes an object whose keys are the column names, taken from the INSERT's column list or from the CREATE TABLE in the same file. Pick the table if there are several, then copy the JSON array or download it.

Can I open a .sql file in Excel?

Not directly: Excel does not read SQL. Open the file here instead, choose the table and switch the output to CSV. The CSV has a header row and quotes values that contain commas or line breaks, so it opens in Excel, Google Sheets or LibreOffice with every column in place.

What happens to rows that cannot be read?

A row with more or fewer values than columns, an INSERT ... SELECT, or a string that is never closed is listed with its line number under the input, and the rest of the file is still read. Nothing is guessed or shifted into the wrong column.

Is my SQL file uploaded anywhere?

No. The file is read in your browser tab, and nothing is sent to a server or stored. Database dumps often contain customer data, so keeping them on your device matters; you can also use the page offline once it has loaded.

Sources

  • PostgreSQL 17 documentation, COPYThe text format pg_dump writes: tab-separated, \N for NULL, backslash escapes, ended by \.
  • PostgreSQL 17 documentation, pg_dumpCOPY by default; --inserts and --column-inserts write INSERT statements
  • MySQL 8.4 Reference Manual, String LiteralsThe backslash escapes in mysqldump output: \0 \' \" \b \n \r \t \Z \\
  • SQLite, INSERTINSERT INTO ... VALUES with several rows, as sqlite3 .dump writes it

Last verified 17 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about SQL to JSON Converter and anybody who knows can answer. No account needed.

More ways to use SQL to JSON Converter

  • SQL to JSON ConverterTurn SQL INSERT statements or a database dump into JSON or CSV, table by table
  • SQL Dump to JSONRead a mysqldump, pg_dump or sqlite3 .dump file and get every table as JSON

Same job, other tools: TSV to JSON – Convert tab-separated values, such as a paste from Excel, into JSON.

On the related tools: Query String Parser – Split a URL query string into a table of decoded parameters.

Related tools

All developer tools
Base64 Encode & DecodeText and files to Base64 and back, with URL-safe mode and image previewUnix Timestamp ConverterUnix timestamps to dates and dates to timestamps, in any time zoneJSON to TypeScriptGenerate TypeScript interfaces or types from a JSON sampleCSV to JSONConvert CSV to JSON and JSON to CSV, with a table previewYAML to JSONConvert YAML to JSON and JSON to YAML, with anchors resolvedURL Encoder / DecoderPercent-encode or decode text and URLs, and see every part of a linkColor ConverterHEX, RGB, HSL, HWB, OKLCH and CMYK in both directions, with a contrast checkNumber Base ConverterBinary, octal, decimal, hex and any base to 36, exact at any size, with two's complement
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)