SQL Insert Generator (CSV/JSON)
Turn CSV or JSON into CREATE TABLE and INSERT statements for MySQL, PostgreSQL, SQLite or SQL Server with correct quoting for text and Arabic, and build an IN clause from a list.
The tool
How to use
- Paste CSV or JSON or drop the file.
- Choose the database and table name, and whether you want CREATE TABLE.
- Check each column type (detected automatically) and change it if needed.
- Copy the SQL or download a .sql file. For an IN clause, open the second tab and paste your list.
Privacy & how it works
Processes your data in the browser and stores nothing.
- Engine: lightweight in-page code, no external libraries.
- Works offline after you open it once.
Frequently asked questions
How is text quoted?
A ' is doubled ('') in every database. MySQL also escapes \. In SQL Server, text with Arabic gets an N prefix (N'سارة') so it is not turned into question marks.
What happens to empty cells?
They become NULL by default. Turn the option off to store them as empty text.
How are column types decided?
From every value: whole numbers INT, decimals DECIMAL with fitting precision, true/false boolean, YYYY-MM-DD date, and anything else text sized to the longest value. Numbers with a leading zero stay text.
Can I run the SQL here?
No, the tool only writes the statements. Copy them into your database, ideally trying a test copy first.