Entrée
Nom de la table
Sortie
Choisissez une opération pour commencer

Générateur CSV vers SQL INSERT

The fastest way to load a CSV into a database is a single INSERT statement with many VALUES tuples. Paste your CSV, set the table name, and get executable SQL immediately: the first row becomes the column list, empty cells become NULL, single quotes are doubled per the SQL standard, and quoted comma fields are split correctly.

The conversion runs entirely in your browser and your CSV is never sent to a server — for export files with sensitive data, that matters more than "online" itself.

Features

How to use

  1. Paste CSV content into the left panel — the first line must be the header (column names).
  2. Fill in the table name (defaults to my_table).
  3. Click "Generate" — the INSERT statement appears on the right.
  4. Click "Copy" or "Download", and check column names and table structure before executing.

FAQ

Is my CSV data uploaded?

No. Parsing and generation are done by JavaScript in the page; there is no code that sends your CSV anywhere, and the page works offline (the first load needs the network for page resources).

Which database dialect is the output?

MySQL / MariaDB style: backticked identifiers, single-quoted strings, doubled quote escaping. PostgreSQL and SQLite mostly accept it too; for SQL Server change the backticks to square brackets — NULL and escaping rules are the same.

What if the first row is not a header?

The first row is always treated as the header for now. If your data has none, add a column-name line (e.g. c1,c2,c3) at the top before generating, then rename the columns to the real ones before executing.

Do commas and newlines inside fields break it?

No. Parsing follows the quoting rules: a field like "a,b" stays intact, and embedded commas and escaped quotes ("") are handled correctly.

Can I execute the output directly?

The statement is a standard INSERT, but confirm the table exists, the column names and data types match, and the row count fits your transaction budget — this tool only generates SQL and makes no assumptions about your schema.

Related tools & reading

Commentaires

Ce site est uniquement frontal : pas de backend ni de compte. Les commentaires vont sur GitHub Issues, Discussions ou par e-mail.

Collez ceci dans l'issue ou l'e-mail pour m'aider à localiser le problème ; cela n'inclut rien de ce que vous avez saisi

Aussi :Voir les commentaires existants · Commentaires par e-mail (sans compte GitHub) :278975598@qq.com