FileGizmo Data & CSV tools

Convert CSV to SQL INSERT statements

Turn CSV rows into escaped SQL INSERT statements locally with configurable table and batch size. Quotes inside values are escaped so the statements will run.

Never uploadedYour file stays on this device
Drop your CSV here or click to choose a file CSV file · processed on this device

Simple by design

CSV to SQL in three steps

FileGizmo turns CSV rows into SQL INSERT statements without uploading the source data. Choose a CSV file, enter the destination table name, select a batch size, and decide whether simple numbers, booleans, and nulls should be inferred. The generated script quotes identifiers, escapes embedded single quotes, and groups multiple rows into each statement for more practical imports.

SQL dialects differ, so the output uses conservative INSERT INTO syntax rather than database-specific bulk loaders. A CREATE TABLE can be included with it, and its column types are read from the rows in the file you gave it: whole numbers become INTEGER, anything carrying a decimal becomes NUMERIC, true and false become BOOLEAN, and everything else stays TEXT. That is a guess made from one file, and the statement says so in a comment above itself, because a column whose first thousand rows are whole numbers is not a promise about the thousand after them. Identifiers are double quoted, which PostgreSQL and SQLite accept and MySQL does not unless ANSI_QUOTES is set. Column names come from the CSV header and are quoted safely. Empty values can remain empty strings or become NULL when inference is enabled. Numeric inference accepts only finite decimal values and avoids evaluating formulas or executable content. The browser worker parses large CSV files in chunks and reports progress while building the script. Review the preview and run imports inside a transaction or staging database first. FileGizmo cannot know your constraints, indexes, reserved-word rules, or conflict policies, so production database validation remains the user’s responsibility.

  1. 1

    Choose a CSV file

  2. 2

    Enter a safe table name and batch size

  3. 3

    Generate preview and download the SQL script

Good to know

Frequently asked questions

Which SQL databases are supported?

The syntax is deliberately conservative. Identifiers are double quoted, which PostgreSQL and SQLite accept and MySQL accepts only with ANSI_QUOTES set.

How are values escaped and typed?

Single quotes inside values are doubled per standard SQL. With inference on, finite numbers and booleans are written unquoted and blank cells become NULL.

Can it write the CREATE TABLE as well?

Optionally, yes. Column types are inferred from the rows in the file and the statement says so in a comment, because one file is a sample rather than a schema.

Is CSV data uploaded?

No. Parsing and SQL generation run locally in a browser worker.

Learn more

Related guides

Data & CSV guideHow to convert Excel to CSV without breaking your dataExport an XLSX worksheet to CSV while protecting leading zeros, long IDs, dates, Unicode text, delimiters, formulas, and row integrity.Data & CSV guideMatching two CSV exports without a databaseTwo files, one shared column, and a question neither answers alone. What a lookup formula costs, where it breaks, and when a join is the shorter road.