CSV in, batched multi-row INSERTs out — with escaping and NULL options.
-- 3 rows → 1 INSERT statement(s), table "users" INSERT INTO `users` (`id`, `name`, `email`, `signup_date`, `plan`) VALUES (1, 'Ada Lovelace', 'ada@example.com', '2026-01-14', 'pro'), (2, 'Liskov, Barbara', 'bl@example.com', '2026-02-02', 'free'), (3, 'Alan Turing', NULL, '2026-03-30', 'pro');
🔐 Values are escaped the SQL-standard way (single quotes doubled); identifiers are sanitized to [A-Za-z0-9_] and quoted with backticks or double quotes. This is a generator for import scripts — when loading untrusted data at runtime, use parameterized queries instead of concatenation.
One INSERT per row means one round trip, one transaction entry, one fsync per row — a 10,000-row import can take minutes. Multi-row INSERTs (this tool's default batch is 25) collapse that into hundreds of statements, routinely an order of magnitude faster on MySQL and Postgres. Past a few hundred rows per statement you hit parser limits and lock windows that stop helping, so the sweet spot is 25-100.
The generated script doubles every single quote ('It''s'), which is the SQL standard and works in every engine. Column and table names coming from a CSV header are sanitized to [A-Za-z0-9_] before quoting — a header like "First Name!" becomes First_Name, and nothing from the file ever reaches the statement as raw syntax. This is a generator for import scripts; at runtime, with untrusted input, parameterized queries are the only correct tool.
A column where every non-empty cell parses as a number is emitted unquoted, everything else as a string. That saves fixing quotes on ID and amount columns — but CSV has no real types: a "postal_code" column of 01234 will lose its leading zero as a number, and an empty string is indistinguishable from NULL. Check the toggle list before you trust the defaults; the header row is your CREATE TABLE column list.
European Excel exports often use semicolons; pasted data sometimes arrives tab-separated. The parser counts candidate delimiters outside quotes in the first lines and picks the winner. Quoted fields with embedded commas, doubled quotes, and CRLF or LF line endings all round-trip; short rows are padded with empty cells and flagged in the header comment rather than silently shifting your columns.
More tools you might find useful
Turn curl commands into JavaScript (Fetch/Axios) and Python requests code.
BPM to delay times in ms for every note value, plus LFO rates.
Convert docker run commands into clean docker-compose.yml files.
Convert Unix timestamps to dates and back, in UTC or local time.