Convert MySQL to CSV
Dump files or
CLI output.
Free MySQL to CSV converter. Upload a mysqldump .sql file to extract INSERT data, or paste MySQL CLI query output — pipe-table or tab-separated. Handles backtick quoting and MySQL escape sequences. Runs in your browser.
Use these commands when you have direct database access — faster than this tool for large datasets.
Two parsers for two common MySQL data formats.
Uploads a .sql file from mysqldump and parses every INSERT INTO block. Handles MySQL-specific syntax: backtick-quoted column names, INSERT IGNORE, multi-row VALUES with thousands of rows per statement, and MySQL escape sequences (\', \\n, \\t).
Accepts the output pasted from the mysql terminal — the pipe-table format with +----+-------+ borders and | id | name | rows. Also accepts tab-separated output from mysql -e "SELECT...". Border rows and "N rows in set" footers are stripped automatically.
The output is proper RFC 4180 CSV with UTF-8 BOM encoding — fields containing commas or newlines are correctly quoted. Open directly in Excel, Google Sheets or import into any database or ETL tool.
Common situations where exporting MySQL data to CSV is necessary.
Database backups from mysqldump contain INSERT statements. Converting them to CSV lets you analyse the data in Excel or Google Sheets — or verify backup integrity — without needing a running MySQL instance to restore to.
When migrating from MySQL to PostgreSQL, SQLite or another system, exporting to CSV is often simpler than converting the SQL dump directly, avoiding syntax differences between dialects. Convert to CSV first, then re-import using the target system's native CSV loader.
Business analysts who need MySQL query results in Excel for pivot tables, charts or manual review paste CLI output or upload dump files to convert to CSV without needing direct database access or spreadsheet software plugins.
Developers who need to share a data snapshot with a non-technical colleague or external party export a table as mysqldump, convert to CSV here, and send the spreadsheet — no database credentials required on the receiving end.
Other free converters on CSVShift you might need.
MySQL data parsed
in your browser. No upload.
CSVShift parses mysqldump files and MySQL CLI output entirely in JavaScript in your browser. Your database data — which may contain sensitive business or personal records — is never transmitted to any server. Both parsers run locally, in memory, on your device.
The MySQL dump parser correctly handles MySQL's backslash escape sequences — \' → ', \\n → newline, \\t → tab — which differ from standard SQL quoting and cause errors in generic SQL parsers.
SELECT * FROM table INTO OUTFILE '/tmp/file.csv' in MySQL — fastest but requires FILE privilege. 2) mysql -u user -p db -e "SELECT * FROM table" > output.csv from command line. 3) Upload a mysqldump .sql file or paste CLI output here for browser-based conversion.mysql -u username -p database -e "SELECT * FROM table" | sed 's/\t/,/g' > output.csv. Or paste the raw mysql CLI output (with the +---+ borders) into CSVShift's CLI Output mode — it strips the borders and converts to proper CSV automatically.