CSV to SQL Converter
Convert CSV into SQL INSERT statements, with an optional CREATE TABLE. Set the table name and copy the script. Runs in your browser.
Reverse: SQL → CSVHow to use the CSV → SQL
- 01
Paste your CSV into the left panel, or type it in.
- 02
Pick the delimiter your CSV uses; the SQL updates instantly on the right.
- 03
Copy the SQL with the copy button.
What it does
This tool turns each CSV row into an INSERT statement for the table name you choose, ready to seed a database. Tick the option to prepend a matching CREATE TABLE.
Values are quoted and escaped safely: numbers stay unquoted, empty cells become empty strings, and single quotes inside text are doubled.
Safe by construction
Identifiers are wrapped in double quotes and string values use single quotes with any embedded quote doubled, so the generated SQL is valid and resistant to breaking on apostrophes.
The output is portable ANSI SQL that most databases accept, including PostgreSQL, MySQL and SQLite.
Private and unlimited
Every conversion happens locally in your browser, so your data is never uploaded, logged or stored on a server. You can use it on confidential exports without a second thought, and it keeps working offline once the page has loaded.
There is no sign-up, no watermark and no row limit: the only ceiling is your device's memory.
Frequently asked questions
Does it create the table too?
Optionally. Turn on "Add CREATE TABLE" and it prepends a statement with every column typed as TEXT, which you can adjust to real types before running.
Which delimiter should I use?
Comma is the standard. Pick semicolon in regions where the comma is the decimal separator (common in German and other European exports), tab for TSV files, or pipe when your values already contain commas.
Is there a row or file-size limit?
There is no fixed row cap or daily quota. Because everything runs locally the practical limit is your device's memory, which comfortably handles the tens of thousands of rows most exports contain.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser with client-side JavaScript, so nothing you paste or drop ever leaves your device. That makes it safe for spreadsheets that contain customer emails, financial figures or other sensitive data.
Sources
Embed this tool
Add this tool to your own website. Copy the snippet below; it stays up to date automatically.
<iframe src="https://monu.tools/embed/en/csv-to-sql" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>Related tools
Change delimiter
Change a file's delimiter: read CSV with one separator and write it with another, such as comma to tab (TSV) or pipe. Runs in your browser.
CSV → flat file
Convert CSV into an aligned fixed-width flat file, padding each column to its widest value. Runs entirely in your browser.
Flat file → CSV
Convert a fixed-width or space-aligned flat file into CSV. Columns split on runs of two or more spaces. Runs in your browser.
CSV → multi-line
Turn each CSV row into a readable block of "Header: value" lines, separated by blank lines. Runs entirely in your browser.