CSV to SQL INSERT

Convert CSV to SQL with explicit text, integer, decimal, boolean or null column types, header handling and dialect-safe escaping.

How to use

With no type list, every cell is text, so codes like 001 remain quoted. To assign types, enter one type per column, for example text,integer,text. Supported types are text, integer, decimal, boolean and null.

The header supplies column names; without it the names are column_1, column_2 and so on. Empty-to-NULL is opt-in. Integer and decimal inputs are validated rather than inserted as expressions, and all text follows the selected SQL dialect.

Behavior and limits

This creates INSERT text only, not CREATE TABLE or a database connection. Verify column types against your schema. Limits: 1,000 data rows, 63 UTF-8 bytes per identifier and 200,000 input characters.

Questions & answers

Why is MySQL text written as hex conversion?

It preserves UTF-8 bytes without relying on the server’s backslash-escape SQL mode.

Is my input sent to a server?

No. Processing runs in your browser and input is not submitted to an API. Original files and remote databases are not modified.

Other Languages

CSV to SQL INSERT — Base64.sh

CSV to SQL INSERT

Convert CSV to SQL with explicit text, integer, decimal, boolean or null column types, header handling and dialect-safe escaping.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Execute generated SQL and query stored rows to check strings, nulls, nested-value handling and types.
Comparison reference
Python sqlite3 execution results.
Verification scope
Execution verification covers SQLite fixtures, not every dialect.
Test source and cases (select a file to read it)
  • data-tools.test.js
    • CSV-to-SQL uses explicit types and preserves default text values under real SQLite execution

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.