Azlaan Electric AC Solar Center — Solar, CCTV, AC & electrical work, Faisalabad Call: 0300-8987448

SQL to CSV Converter

Turn SQL INSERT INTO statements into a clean CSV file. Handles quoted strings with commas, escaped quotes, NULL values and multi-row inserts. Everything runs inside your browser — your data never leaves your device.

Conversion summary

0
INSERT statements
0
Data rows
0
Columns

Preview (first 10 rows)

CSV output

Copied to clipboard.

How to use

  1. Paste one or more INSERT INTO table (columns) VALUES (...) statements above.
  2. Click Convert to CSV. Column headers come from the column list in each INSERT.
  3. Check the preview and the row counts, then Copy CSV or Download .csv.
  4. Open the file in Excel, Google Sheets or LibreOffice Calc — it imports as normal comma-separated data.

Notes

  • NULL becomes an empty cell. Numbers stay as-is; quoted strings are unquoted and unescaped.
  • Strings containing commas, e.g. 'New York, USA', are wrapped in quotes in the CSV so they stay in one cell.
  • Escape quotes with double single-quotes ('O''Brien') or a backslash ('O\'Brien').
  • If a row has a different number of values than columns, you get an error with a line hint instead of silent corruption.

Frequently asked questions

Which SQL syntax is supported?

Standard INSERT INTO table (col1, col2) VALUES (v1, v2), (v3, v4); statements, including multi-row inserts. Other statements such as SELECT or UPDATE are not converted.

How are NULL values handled?

The SQL keyword NULL becomes an empty cell in the CSV output, which is the standard way spreadsheets represent missing values.

How do I escape quotes inside a string?

Use two single quotes inside the string, for example 'O''Brien', or a backslash escape like 'O\'Brien'. The converter unescapes both forms correctly.

Is my SQL data uploaded anywhere?

No. The conversion runs entirely in your browser with JavaScript, so your SQL never leaves your device.