How to use Table to SQL Insert Generator
- Paste a table or select a supported file and sheet.
- Choose a dialect, table name, column types and insert or upsert.
- Review the generated source before using it with your database.
Example: Table to SQL Insert Generator
Generate one typed insert.
Options
- Column types
- Unlisted headings remain text. Map only the intended columns to number or boolean; text preserves identifiers and leading zeroes. Empty-to-NULL is a separate choice.
- SQL dialect and upsert
- The selected dialect controls quoting and syntax. PostgreSQL/SQLite conflict keys need a matching existing unique key. MySQL/MariaDB can react to any primary or unique key, not only the entered conflict-key list.
- Batch size
- Group 1–500 records per statement. A final group can be smaller; this does not check a target server statement-size or packet limit.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Generated SQL still needs a target-schema review
The tool formats entered table values; it does not connect to a database, create the target table or verify its constraints. Check column types, identifiers, null handling and the intended conflict behavior before execution. Try the script on a disposable copy when replacing real records.
A type declaration changes how a value is written
A numeric mapping emits numeric values, while text mappings quote strings. Applying a number type to an identifier can remove a meaningful text convention or reject the value. Keep a source export and review a few statements containing blanks, quotes and formula-like text.
Questions about Table to SQL Insert Generator
Does this import into my database?
No. It creates SQL text. Review it and use your own database tools when ready.
Will numbers be guessed from the CSV?
No. Select column types explicitly so account codes and leading zeroes remain text.
Why must I choose conflict columns?
PostgreSQL and SQLite upserts need a conflict target. The tool cannot discover or create your destination constraints.