SQL INSERT Generator

Generate SQL INSERT, UPDATE, UPSERT or DELETE statements from CSV, TSV or JSON. Pick MySQL, PostgreSQL, SQL Server, SQLite or Oracle and batch rows into one query.

  • Free, no sign-up
  • Runs in your browser
  • Your data stays private

How to use the SQL INSERT Generator

  1. Paste CSV, tab-separated cells or a JSON array.
  2. Enter the table name, database and statement type.
  3. Copy the SQL script.

Why use this SQL INSERT Generator

  • Five databasesCorrect identifier quoting and syntax for MySQL, PostgreSQL, SQL Server, SQLite and Oracle.
  • Four statementsINSERT, UPDATE by key, UPSERT and DELETE by key.
  • BatchingGroup many rows into a single multi-row INSERT.
  • Type detectionNumbers, booleans and dates are written without needless quotes, and empty cells become NULL.

Frequently asked questions

How do I generate INSERT statements from a CSV?

Paste the CSV with a header row and enter the table name. Each row becomes an INSERT statement.

How are quotes in values handled?

Single quotes are doubled, and backslashes are escaped for MySQL.

Can I generate an UPSERT?

Yes. Choose UPSERT and a key column to get ON DUPLICATE KEY, ON CONFLICT or MERGE syntax for the selected database.

Related tools

More Developer Tools

User Reviews

–
No ratings yet
Write a review
Your rating *

Your email is never published. Reviews are moderated, and links aren't allowed.

What users are saying

No reviews yet

Be the first to share your experience with this tool — your feedback helps others.