CSV to SQL Converter — INSERT Statements for MySQL, Postgres & More
Generate INSERT statements from CSV. MySQL, PostgreSQL, SQLite, or SQL Server dialect, with optional CREATE TABLE.
Cách dùng
- 1 Paste your CSV data.
- 2 Enter the target table name and choose the SQL dialect.
- 3 Toggle "Include CREATE TABLE" to add a best-guess schema at the top.
- 4 Copy or download the generated SQL — one INSERT per row.
Vì sao dùng công cụ này
- Four dialects — MySQL, PostgreSQL, SQLite, SQL Server. Identifiers quoted appropriately for each.
- String literals use single-quote doubling — portable across all four targets.
- Cell type inference — empty becomes NULL, numbers stay unquoted, everything else escaped string.
- Optional CREATE TABLE with best-guess column types (INT / DECIMAL / TEXT).
Câu hỏi thường gặp
How are NULLs detected?
Any empty cell becomes the literal NULL (no quotes). To insert an empty string instead, set the cell to a single space or modify the SQL output.
Does it handle Postgres-specific types like JSONB?
No — column inference is limited to INT, DECIMAL, TEXT. Edit the CREATE TABLE manually if you need JSONB, ARRAY, or other extended types.
Will the SQL be properly formatted?
One statement per line. For pretty-printing, run the output through the <a class="text-brand-600 hover:underline" href="/sql-formatter">SQL Formatter</a>.
Related tools?
See <a class="text-brand-600 hover:underline" href="/csv-to-json">CSV to JSON</a> for a generic JSON conversion or <a class="text-brand-600 hover:underline" href="/csv-to-xml">CSV to XML</a> for XML output.
CSV to SQL Converter là gì?
A CSV to SQL Converter is a tool that generates SQL INSERT statements from CSV data, mapping the header row to column names and each row to a set of values. It runs in the browser, supports MySQL, PostgreSQL, SQLite, and SQL Server dialects, and can optionally emit a matching CREATE TABLE statement for the target table.
CSV to SQL Converter là công cụ lập trình miễn phí của Zerethon Tools. Generate INSERT statements from CSV. MySQL, PostgreSQL, SQLite, or SQL Server dialect, with optional CREATE TABLE. Chạy hoàn toàn trong trình duyệt — không đăng ký, không tải lên.
- Danh mục
- Lập trình
- Giá
- Miễn phí
- Quyền riêng tư
- Chạy trên trình duyệt
- Đăng ký
- Không cần
Quyền riêng tư
Dữ liệu của bạn không bao giờ rời khỏi trình duyệt trừ khi được nêu rõ. CSV to SQL Converter chạy hoàn toàn phía client — không tải lên máy chủ, không ghi log, không theo dõi dữ liệu bạn nhập.
Kiến thức cơ bản
Công cụ liên quan
JSON Formatter
Format, validate, and minify JSON online. Free, no signup — your data never leaves your browser.
Mở công cụSQL Formatter
Format SQL queries online — beautify MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and BigQuery.
Mở công cụUUID Generator
Generate UUIDs online — v1, v4, v7, and Nil. Bulk generation up to 10,000. Free, no signup.
Mở công cụPassword Generator
Generate strong, cryptographically random passwords. Configurable length and character sets — runs in your browser.
Mở công cụBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.