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