← Toolz / Developer Tools / Database Converter

Database Converter

Convert a whole database at once — not one table at a time. Database → CSV turns every table of a SQLite file (.db, .sqlite, .sqlite3), a .sql script or an Excel workbook (.xlsx) into its own CSV — delivered as one ZIP, or as a single Excel workbook with one sheet per table. CSV → Database turns one or more CSV or Excel files (each Excel sheet becomes a table) into a ready-to-use SQLite database (.sqlite) or a SQL dump (.sql), with column types inferred from your data. Everything runs on your device with the sql.js engine (SQLite compiled to WebAssembly): nothing is uploaded.

Whole databases in and out — every table, both directions, without installing a thing.

100% free · No sign-up · No daily limits · No watermarks · Processed in your browser — files never leave your device

UNDERSTAND YOUR RESULTS

Database Converter — Whole Database to CSV & CSV to Database guide

Convert an entire SQLite database in one go: every table becomes its own CSV in a single ZIP download — or go the other way and turn one or more CSV files into a working SQLite database (.sqlite) or a SQL dump (.sql), with column types inferred from the data. It accepts .db, .sqlite, .sqlite3 and .sql script inputs, runs entirely in your browser with the real SQLite engine (sql.js, SQLite compiled to WebAssembly), and never uploads a byte.

How to use this tool

  1. Pick a direction at the top. Database → CSV takes a database file or a .sql script; CSV → Database takes one or more CSV files, and each file becomes one table.
  2. For Database → CSV: untick any tables you do not want, choose a delimiter (comma, semicolon or tab), then convert. One selected table downloads as a plain .csv; several download as a ZIP with one CSV per table.
  3. For CSV → Database: check each file’s preview and inferred schema first — rename the table if you like, correct the delimiter if auto-detection guessed wrong, and untick “First row is a header” for header-less files.
  4. Choose the output — a SQLite .sqlite file you can open in any database tool, or a .sql dump you can read, edit and run anywhere — then convert and download.

A worked example

A support engineer exports a shop app’s whole database before a migration: four tables become four CSVs in one ZIP for the accounts team. A week later she reverses it — the edited CSVs drop back in and become a fresh .sqlite with the same table names, and the app reads it without a single hand-written CREATE TABLE.

What you can do with this tool

How it works

Both directions use sql.js, the real SQLite C library compiled to WebAssembly, so files are parsed and produced by SQLite itself rather than a look-alike converter. Database → CSV steps through each table row by row; NULLs become empty fields and BLOBs are written as base64 so binary data survives the trip. CSV → Database parses quoted fields properly (commas, quotes and newlines inside values included), detects the delimiter from the file’s own pattern, and infers each column’s type from up to 1,000 sampled values: clean integers become INTEGER, decimals REAL, and anything else — including codes with leading zeros like 00123 — stays TEXT so no digit is ever silently lost.

Frequently asked questions

Is my database uploaded to a server?

No. Reading, converting and zipping all happen inside your browser tab with SQLite compiled to WebAssembly. Nothing is sent anywhere, which is why the tool is safe for production exports and backups.

How is this different from the SQLite Viewer’s CSV export?

The Viewer exports one result set at a time — the table you are browsing or the query you ran. This converter works on the whole database at once: every table, one CSV each, in a single ZIP — and it also runs in reverse, building databases from CSVs, which the Viewer does not do.

Can it open a .sql file instead of a database file?

Yes. A .sql script (for example a sqlite3 .dump export) is run on your device first to build its database in memory, then converted like any other database. If a statement in the script fails, the error names the failing statement instead of pretending the import worked.

Why did my codes come back as text instead of numbers?

On purpose. Values with leading zeros (00123), very long digit strings, and anything that is not a clean integer or decimal are kept as TEXT, because converting them to numbers would silently drop zeros or precision. Genuine numbers — counts, prices, balances — are detected and typed INTEGER or REAL.

What happens to NULL values and empty cells?

A NULL exports as an empty CSV field, and an empty CSV field imports as NULL — CSV has no separate spelling for the two, so they share one. BLOB columns travel as base64 text; on the way back they are stored as that text, since CSV cannot carry raw binary.