Convert CSV to SQL — CREATE TABLE and INSERTs
Paste CSV and get a CREATE TABLE with inferred column types plus INSERT statements for every row. It runs in your browser (0 uploads, works offline).
How to use it
- Paste your input into the left pane.
- Choose any options shown above the panes.
- The result updates live on the right — Copy or Download it.
FAQ
How do I convert CSV to SQL insert statements for free?
Paste your CSV and this page generates a CREATE TABLE statement with column types inferred from the data, followed by one INSERT per row — all in your browser, with no upload. Set the table name above the panes.
How are column types decided?
Each column is scanned: all-integer columns become INTEGER, all-numeric become REAL, everything else TEXT. Empty cells become NULL, and text values are safely single-quoted with escaping.
Is my data uploaded?
No. Generation runs locally and nothing is stored; it works offline — so a customer export never leaves your machine.
Which SQL dialect is this?
Standard SQL that works in SQLite, PostgreSQL and MySQL for the common cases. Column names are sanitised to valid identifiers.
Limits
Type inference is heuristic from the data present; a column that is numeric-looking but meant as text (a phone number) is best set to TEXT by hand. Dialect-specific types are not emitted.
Related
CSV to Markdown and JSON to CSV cover other outputs; the delimiter converter changes separators.
Bookmark this page (Ctrl+D, or ⌘D on Mac) or install the app — it works offline the next time you need it.