SQL Script to CSV
Select tables from a PostgreSQL SQL dump and download one CSV per table.
- Free
- Works Offline
- No Uploads
How to Convert SQL to CSV
- Open the HTML, review Security Check, then select Continue.
- Choose a supported PostgreSQL .sql file or select Open Sample.
- Review table counts, typed previews and skipped statements. Select the tables to export.
- Review spreadsheet formula protection and select Convert to CSV. Download the ZIP and extract its CSV files.
Review and Select Tables
- Confirm table names, row and column counts, and typed record previews before converting.
- Choose the tables to include and review the skipped metadata.
- Download one ZIP containing the selected tables with ordered CSV headers.
Formats and Compatibility
| Input | One UTF-8 PostgreSQL plain-text .sql file with ordinary table definitions and complete literal INSERT or default text COPY rows. |
|---|---|
| Output | One ZIP with a UTF-8 comma-separated CSV file per selected table. Headers follow the original definition order. |
| Browser | A modern browser with local file support. |
| Scope | Supports UTF-8 PostgreSQL plain-text dumps with ordinary CREATE TABLE definitions, full literal INSERT rows, and default text COPY FROM STDIN. Input is limited to 32 MiB, 1,000 tables, and 100,000 statements. Output CSV data is limited to 48 MiB. The converter reads data locally and does not execute SQL. |
| Operating Systems |
Local Processing Without Uploads
Use SQL to CSV without uploading files. The browser-based tool reads the selected file locally with no upload, account, or database connection.
Select Open Sample to see the workflow with the included example.
From PostgreSQL Rows to CSV
SQL NULL becomes an empty field. CSV quoting keeps commas, quotes, and line breaks in a single field. The optional formula protection prefixes formula-like text with an apostrophe. Binary values use hexadecimal and exact integer values are written as text digits.
Open the CSV Files
Extract the ZIP and open the needed CSV. To keep the sample reference 00073 and its large integer unchanged in a spreadsheet, import those columns as text.
Frequently Asked Questions
How do I use SQL to CSV offline?
Use the SQL to CSV download to get the tool ZIP. Extract it and open SQLScriptToCSV.html. This free SQL to CSV converter bundles its reader and sample.
Can I use SQL to CSV in browser?
Yes. The local SQL to CSV tool reads supported PostgreSQL files on your device and builds the CSV ZIP in the browser.
Can I extract SQL INSERT data to CSV?
Yes. Include a CREATE TABLE definition and complete literal INSERT INTO VALUES rows for each table. Default PostgreSQL text COPY blocks also work.
Which statements are skipped or rejected?
The workbench identifies the metadata it skips. SQL expressions in rows, unrelated SQL commands, file and program COPY, extensions, and connection directives are rejected. MySQL, MariaDB, and PostgreSQL custom archives are outside scope.
How are NULL and formula-like text handled?
NULL becomes an empty CSV field. Formula protection is on by default and changes only formula-like text and headers. Clear it when you need the literal text unchanged.
Does this tool work offline on Windows, macOS, Linux, and ChromeOS?
Yes. Local Studio tools run offline on Windows, macOS, Linux, and ChromeOS. Download the tool ZIP, extract it, and open the included HTML file in a supported browser. Your files are processed on your device without uploads.
Which browsers can I use with this offline tool?
Use a current version of Google Chrome, Microsoft Edge, Mozilla Firefox, or Safari where that browser is available for your operating system. Chrome is built into ChromeOS, and Safari is available on macOS.