Text to SQL Converter

Convert CSV, TSV, and delimited plain text into SQL CREATE TABLE and INSERT statements.

Text Input

Parsing and SQL options

All parsing and SQL generation runs locally in your browser. This tool converts delimited tabular text into CREATE TABLE and INSERT statements.

SQL Output

How to Use

  1. Paste or upload CSV, TSV, or delimited text
  2. Review detected delimiter, headers, and row preview
  3. Configure table name, dialect, and output mode
  4. Edit schema columns if needed
  5. Copy or download the generated SQL

What is Text to SQL conversion?

Text to SQL conversion turns structured plain-text rows into database-ready SQL scripts. This is useful when you have spreadsheet exports, log extracts, or delimited data files and need CREATE TABLE and INSERT statements without writing SQL by hand or connecting to a database.

Supported input formats

  • CSV (comma-separated)
  • TSV (tab-separated)
  • Pipe-delimited and semicolon-separated text
  • Pasted query exports and plain .txt tabular data

Related tools

Frequently Asked Questions

What text formats does this tool accept?

Comma-separated (CSV), tab-separated (TSV), pipe-delimited, and semicolon-separated text. Delimiter and header row can be auto-detected or set manually.

What SQL does it generate?

CREATE TABLE statements with inferred column types plus INSERT, UPSERT, MERGE, REPLACE, or PostgreSQL COPY data statements depending on dialect and output mode.

Does this execute SQL against my database?

No. The tool only generates SQL text locally in your browser. Copy the output and run it in your own database client.

Is my data uploaded anywhere?

No. Parsing and SQL generation run entirely in your browser. Your text never leaves your device.

Which SQL dialects are supported?

PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, and ANSI SQL with dialect-specific identifier quoting and output syntax.

Can I edit column names and types before generating SQL?

Yes. Use the Schema tab to rename columns, override SQL types, toggle nullable/primary key flags, and include or exclude columns.

How are NULL values handled?

Empty cells can remain as empty strings or be converted to SQL NULL when you enable empty string as NULL.

Can I generate UPSERT or MERGE statements?

Yes. Choose UPSERT (MySQL/PostgreSQL), MERGE (SQL Server), REPLACE (MySQL), or COPY (PostgreSQL) in output mode when a primary key is defined.

What is the relationship to SQL to Text?

SQL to Text extracts readable plain text from SQL INSERT data. Text to SQL is the inverse — it builds SQL from structured text rows.

What file sizes can it handle?

Small and medium files convert instantly. Large inputs use a Web Worker. Practical limits depend on your device; tens of thousands of rows is a reasonable upper range.

Does it support Excel files?

Not yet. Upload CSV or TSV exports from Excel, or paste tabular text directly. Excel import may be added in a future update.

Can I skip duplicate rows?

Yes. Enable skip duplicate rows in parsing options to deduplicate identical records before SQL generation.