Advertisement

TSV to SQL Insert

Convert TSV to SQL Insert free, in seconds. Paste your data below, press Convert, then copy the result and run it against MySQL, PostgreSQL or SQLite. Everything runs in your browser, so nothing is ever uploaded.

TSV input

Paste your TSV below, then press Convert.

The first line is treated as the header row. Tabs separate the fields.
Used in the INSERT INTO clause.

SQL Insert output

Waiting for TSV input.

Private by design: parsing uses the PapaParse library (loaded once from a CDN); the conversion itself happens locally and your data is never uploaded.
Advertisement

How this conversion works

Paste TSV into the input box and press Convert (or just keep typing, conversion happens as you type). The tool parses it with the PapaParse library using a tab delimiter, using the first row as column headers, then generates a single multi-row INSERT statement, quoting strings, passing numbers through and turning blanks into NULL. Parsing uses the PapaParse library (loaded once from a CDN); the conversion itself happens locally and your data is never uploaded.

Running the SQL

The output is one multi-row INSERT statement, which loads faster than one statement per row. Strings are single-quoted with inner quotes doubled, numbers pass through unquoted, booleans become TRUE or FALSE, and empty values become NULL. Edit the Table name field before converting to target your real table; the name is sanitized to safe characters automatically.

TSV to SQL Insert FAQs

Why convert TSV to SQL INSERT?
INSERT statements are the universal way to seed a database: run the output in MySQL, PostgreSQL, SQLite or MariaDB to load exported data into a table in one step. It is handy for migrations, demos and test fixtures.
How is my TSV parsed?
With the PapaParse library using a tab delimiter: the first line becomes the column headers, quoted fields are respected, and empty lines are skipped.
Can I change the table name?
Yes. Edit the Table name field above the output before pressing Convert. It defaults to my_table and is sanitized to letters, numbers, underscores and dollar signs.
How are values quoted?
Strings are single-quoted with inner quotes doubled, numbers pass through unquoted, booleans become TRUE or FALSE, and empty values become NULL. Everything goes into one multi-row INSERT statement for speed.
Is my data sent to a server?
No. parsing uses the PapaParse library (loaded once from a CDN); the conversion itself happens locally and your data is never uploaded.
Advertisement