CSV to SQL converter
Turn CSV into SQL INSERT statements, with an optional CREATE TABLE, for PostgreSQL, MySQL and more.
Database
Missing a feature or found a bug in CSV to SQL converter? Tell me on X (@_andrewtran) or by email.
How to use CSV to SQL converter
- Paste CSV with a header row in the input pane.
- Set the table name and choose your database.
- Copy the SQL or download it as a .sql file.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
How are values typed?
A column where every value is a number is written bare. Everything else is quoted, and empty cells become NULL. Values with a leading zero, such as postcodes, stay text.
Which separators work?
Commas, semicolons, tabs and pipes. The one used most in the header row is picked for you.
Related tools
JSON to SQL converter
Turn a JSON list of objects into SQL INSERT statements, with an optional CREATE TABLE.JWT generator
Sign a JSON payload as a JWT with a secret (HS256) or a private key (RS256, ES256, EdDSA and more).2FA code generator
Generate time-based one-time codes (TOTP) from a secret or an otpauth:// link, to test sign-in flows.File hash checker
Get the SHA-256, SHA-1, SHA-384 and SHA-512 checksum of any file and verify a download.