CSV to SQL Converter

Runs in your browser — your files are never uploaded.

Turn a CSV file into ready-to-run SQL. OkConverter generates a CREATE TABLE statement with column types inferred from your data, followed by one INSERT statement per row with values safely escaped. The conversion runs locally in your browser, so your data is never uploaded.

How to convert CSV to SQL

  1. 1

    Drop your .csv file onto the box, or click to choose one.

  2. 2

    OkConverter infers each column type and builds CREATE TABLE plus INSERT statements.

  3. 3

    Click "Download" to save your .sql file, ready to run.

Share

Embed this tool on your site

Paste this where you want the tool to appear. It runs entirely in your visitor's browser — no uploads, no account, no tracking.

Please keep the attribution line — it's what keeps these tools free.

Need a different size, a dark theme, or a different tool? Build an embed lets you preview it first.

Frequently asked questions

How are column types decided?+

OkConverter scans each column and picks the narrowest fit: INTEGER for whole numbers, REAL for decimals, and TEXT for everything else.

Is the SQL safe to run?+

Column names are sanitized to valid identifiers, text values are single-quote escaped, and empty cells become NULL. The output targets standard SQL and works with SQLite, MySQL and PostgreSQL.

Are my files uploaded?+

No. The conversion runs entirely in your browser on your device — your CSV is never uploaded.