Welcome to the documentation for the MongoDB to SQLite migration tool.
This tool provides a robust, efficient way to migrate MongoDB databases to SQLite/LibSQL with automatic schema inference and intelligent type mapping. It supports both local SQLite files and Turso cloud databases.
Download the latest release for your platform from the Releases page.
Extract and install:
tar -xzf mongo-to-sqlite-*.tar.gz
sudo mv mongo-to-sqlite /usr/local/bin/
Migrate all collections to a local SQLite file:
mongo-to-sqlite --database mydb --all-tables --output mydb.db
Migrate to Turso cloud:
export TURSO_DATABASE_URL="libsql://your-database.turso.io"
export TURSO_AUTH_TOKEN="your-auth-token"
mongo-to-sqlite --database mydb --all-tables
Get up and running in minutes with step-by-step instructions and common usage examples.
Understand how MongoDB BSON types are converted to SQLite types, including handling of complex nested data.
mongo-to-sqlite --database dev_app --all-tables --output dev.db
mongo-to-sqlite \
--mongodb-uri "mongodb+srv://prod-cluster.mongodb.net" \
--database production \
--all-tables \
--output backup-$(date +%Y%m%d).db
export TURSO_DATABASE_URL="libsql://edge-db.turso.io"
export TURSO_AUTH_TOKEN="$TURSO_TOKEN"
mongo-to-sqlite --database app --all-tables
This project is licensed under the MIT License.