CSV to SQL Generator
Convert CSV into CREATE TABLE and INSERT statements (choose the table name and DB dialect).
도구를 불러오는 중…
🔒 Everything runs 100% in your browser. Your files and input are never uploaded to any server.
This tool converts CSV data into CREATE TABLE and INSERT statements you can load into a database. It automatically infers column types and quotes identifiers to match the MySQL, PostgreSQL, SQLite, and SQL Server dialects.
How to use
- Paste your CSV data or load a sample with 'Insert example'.
- Choose the table name, target DB dialect, and delimiter.
- Adjust options such as whether to use the first row as column names, auto-infer types, and bundle multiple rows into one INSERT.
- Copy the generated CREATE TABLE and INSERT statements and use them.
FAQ
- How are column types decided?
- It scans each column's values and infers INT/INTEGER if all are integers, DECIMAL/NUMERIC/REAL if decimals are included, a BOOLEAN type for true/false/yes/no, and a string type (VARCHAR/TEXT) otherwise. If you turn off 'Auto-infer data types', all columns are treated as strings.
- How are single quotes and empty values handled?
- Single quotes inside strings are escaped the standard way (doubled to ''), and empty cells are inserted as NULL. Booleans are output as TRUE/FALSE or 1/0 depending on the dialect.
- Can I run the generated SQL right away?
- It's a reference draft, so always review it before running. Type inference is based on the sample data and may differ from the actual schema, and dialect-specific rules like MySQL's backslash escaping aren't applied automatically, so verify before applying it to important data.
