LOCAL DATABASE CONVERTER

SQLite to PostgreSQL Migration Converter

Generate a PostgreSQL schema and data draft from SQLite, with type mappings and a review report. No database upload. No account or installation required. Your original file stays unchanged.

How to convert

  1. Open an unencrypted .db, .sqlite or .sqlite3 file in the workspace.
  2. Select a table to browse it, or write a query. Filters and sorting apply across the database.
  3. Choose Export data, select POSTGRESQL, and save the complete export.

What the download contains

Exports ordinary tables and all their rows into a review-only SQL draft for an empty PostgreSQL database. INTEGER maps to BIGINT, REAL to DOUBLE PRECISION, TEXT to TEXT and BLOB to BYTEA. NUMERIC affinity maps to text instead of guessing dates or booleans. NOT NULL is preserved. Keys, other constraints, defaults, indexes, views, triggers, collations and identity sequences require manual recreation. Generated values are materialized. Mixed incompatible values fail. Limits: 100,000 rows, 256 columns per table and 16 MiB SQL.

-- SQLite INTEGER -> PostgreSQL BIGINT
-- SQLite TEXT -> PostgreSQL TEXT
-- SQLite BLOB -> PostgreSQL BYTEA

Review the migration before importing

The converter exports the whole database, regardless of your selected table or query. Read the mapping report in the workspace and SQL comments. This is a starting point for migration, not a schema-equivalent backup.

  1. Adjust target types, keys, constraints and defaults for your application.
  2. Import into an empty disposable target database using its native client.
  3. Compare row counts, exact IDs, NULLs, text, BLOBs and representative queries.
  4. Recreate indexes, relationships and ID generation, then test your application before replacing any production database.

SQLite Lab does not connect to MySQL or PostgreSQL. Target-server restoration has not been verified here. Virtual/shadow tables and incompatible mixed storage types are rejected.

Target database type reference

Complete export, bounded preview

The grid displays a bounded preview. CSV, JSON, Excel and PDF export runs one read-only SELECT again against the current database; it respects any LIMIT in your query. It does not rerun writes or export cached results. To export a whole table, select Current table with applied filters and sorting. Export one table per download.

File size and browser support

Rows are processed in chunks with progress and cancellation. Browsers with direct file saving write to disk; other browsers use a download limited to 64 MiB. Exceeding that limit fails explicitly instead of downloading a partial result. Large individual values and query execution limits still apply. Saved SQLite imports use browser storage; temporary database imports are limited to 100 MiB.

Keep a database backup

Use Export database for a complete SQLite snapshot, including full BLOBs. CSV and JSON are data formats, not schema-preserving backups. SQL dumps contain transaction commands that the workspace deliberately rejects; restore them in an external SQLite client.

Read the export guide · SQLite viewer · Convert CSV to SQLite