Turn a CSV into INSERT statements
The two things home-made scripts get wrong: a name with an apostrophe, and a blank cell that becomes an empty string instead of NULL.
How CSV to SQL works
Parsers and formatters run as JavaScript on the source you pasted. That is why a large document can freeze the tab for a moment — the work is genuinely happening here, not on a server. Configuration files and private keys therefore never leave your machine to be formatted.
That is the whole architecture: static files, one script, no upload endpoint to leak or log. Close the tab and the work is gone.
Good to know
- Works offline once loaded, including on flights and in locked-down networks.
- No file size limit beyond your device's own memory.
- Free to use, with no account and no usage counter.
- Results are produced locally, so they are not logged or shared with anyone.
Questions
Which dialect is the output?
MySQL-style backticks and standard single-quote escaping. It runs unchanged on MariaDB and, with the backticks removed, on PostgreSQL and SQLite.
How are empty cells handled?
As NULL, which is the honest representation of a missing value. If you need an empty string, that is a deliberate choice the SQL should make, not a default.
Why batch the rows?
A 50,000-row single INSERT can exceed the server's packet limit. Batching 100 rows per statement is fast and safe on every default configuration.
Does it handle quoted commas?
Yes — RFC 4180 quoting is parsed, including doubled quotes inside a field.
Keep going
More developer tools
JSON Formatter
Format, validate and minify JSON with precise error messages. Everything runs locally in your browser.
Open toolRegex Tester
Test regular expressions live with highlighted matches, capture groups and a replace preview.
Open toolCron Parser
Turn a five-field cron expression into a readable description with the next five scheduled runs in your timezone.
Open toolHTML Formatter
Indent nested HTML so the structure is readable, without changing any markup.
Open toolCSS Minifier
Strip comments and whitespace from CSS and see exactly how many bytes you saved.
Open toolJSON Array to Text
Flatten a JSON array into one value per line. Objects inside the array are written as compact JSON on their own line.
Open tool