SQLite
A complete SQL database in a library and a single file, with no server to run.
- What it is
- Relational databases
- Type
- Open source
- Made by
- The SQLite developers (Hwaci)
- License
- Public domain
- Facts checked
- 5 October 2026
What it is
SQLite is not a server. It is a library, under 900 KiB with every feature, that your program links in and calls directly. The whole database (tables, indexes, triggers, views) lives in one ordinary file that you can copy, email or check into a test fixture. Opening the database is opening the file, so there is no network hop, no user accounts and nothing to configure. Its authors describe it as a replacement for fopen(), not for Oracle.
It still gives you real SQL and ACID transactions that survive power loss. In write-ahead-log (WAL) mode, readers and a writer work at the same time, but only one writer can commit at a time per file. A database can reach 281 TB, the file format works across platforms, and the developers promise to support it through 2050. It is the most widely deployed database in the world, inside phones, browsers, cars and desktop apps, and it serves many small to medium websites.
Why teams pick it
- Zero administration: no server, no ports, no accounts
- Queries run in-process, so there’s no network round trip
- One portable file is easy to back up, ship and test against
- Public domain, heavily tested, with a stable file format
Watch out for
- One writer at a time per database file, so write-heavy multi-user apps outgrow it
- All processes must be on one machine; WAL mode doesn’t work over a network file system
- No built-in replication, user accounts or network access; separate tools have to add them, and forks such as libSQL and Turso add replicas, sync and concurrent writers
- Types are flexible by default, so a column accepts values of other types unless you use
STRICTtables
Good for
- Data model
- Relational tables in one file; flexible column types unless
STRICT - Query language
- SQL (SQLite dialect)
- Client protocol
- None: in-process library calls
- Transactions
- ACID, surviving crashes and power loss
- Default isolation
- Serializable
- How it scales
- One file on one machine; one writer at a time
- Replication
- None built in
- Storage engine
- Single database file with a rollback journal or write-ahead log
- Written in
- C, shipped as one
sqlite3.cfile - Ways to run it
- Embedded library
Alternatives
What all relational databases have in common →Compare side by side →How it fits with other technologies
What uses SQLite
- Cis the implementation language ofSQLite
- Active Record (Ruby on Rails)reads and writes model rows inSQLite
- entgenerates typed queries forSQLite
- Entity Framework Corequeries through Microsoft’s providerSQLite
- Prisma ORMgenerates queries and migrations forSQLite
- SQLAlchemygenerates SQL through a dialect forSQLite
- Tortoise ORMconnects with aiosqlite toSQLite
- Drizzle ORMbuilds typed SQL forSQLite
- jOOQgenerates classes from and queriesSQLite
- Dapperruns hand-written SQL againstSQLite
- Alpacakeeps its chats inSQLite
- LangGraphcan checkpoint local runs inSQLite
- K3skeeps a single server’s state inSQLite
- celldgives each cell its own database inSQLite
- Durable Objectsgives each object a private database withSQLite
- Bytewaxkeeps recovery snapshots inSQLite
- Streamlingcan keep its checkpoint offsets inSQLite
- Baculacan keep its catalog inSQLite
- DRLM (Disaster Recovery Linux Manager)keeps clients, jobs and backups inSQLite
- Duplicatikeeps its server database inSQLite
- Cloudflare D1is built on and speaks the SQL ofSQLite
- Tursois a fork and a Rust rewrite ofSQLite
- FoundationDBbuilds its ssd B-tree engine onSQLite
- Chromakeeps local data and metadata inSQLite
- ChartDBdraws diagrams of schemas inSQLite
- DB Pilotbrowses and queriesSQLite
- Kaitai Structships a parser for the file format ofSQLite
- DuckLakecan keep its catalog inSQLite
- GizmoSQLcan serve, as a second backend,SQLite
- Shillelaghruns queries as virtual tables inSQLite
- Spice.ai OSScan accelerate datasets inSQLite
- Meltanokeeps its system database inSQLite
- Streambedkeeps replication positions inSQLite
- Forgejocan keep its database inSQLite
- Fossilkeeps each repository inSQLite
- Giteacan keep its database inSQLite
- Grafanastores its dashboards by default inSQLite
- Uptime Kumastores monitors and heartbeats inSQLite
An embedded database with Python’s standard library · python
import sqlite3
con = sqlite3.connect("app.db") # creates the file if needed
con.execute("PRAGMA journal_mode=WAL") # readers don't block the writer
con.execute("CREATE TABLE IF NOT EXISTS notes (id INTEGER PRIMARY KEY, body TEXT NOT NULL)")
with con: # one transaction, committed on exit
con.execute("INSERT INTO notes (body) VALUES (?)", ("buy coffee",))
for note_id, body in con.execute("SELECT id, body FROM notes ORDER BY id"):
print(note_id, body)See it in a real stack
No architecture uses SQLite yet. Drop it into the playground and wire it up yourself.Open playground →Benchmarks
Where it came from2000–2025
In 2000, D. Richard Hipp was leading a team writing damage-control software for a US Navy guided-missile destroyer, as a contractor. The software used an Informix database server, and when that server went down the application wouldn’t run; a dialog box popped up saying “Can’t connect to database server.” On a warship that has taken battle damage, that is the last thing the crew should see. Hipp asked why the program needed a server at all, instead of reading its data straight off the disk, and found no SQL engine that worked that way.
When a budget fight paused government contracts that year, he had a few months free and wrote one. SQLite began as a Tcl extension; version 1.0 came out in August 2000, storing data with gdbm. Version 2.0 in September 2001 replaced gdbm with Hipp’s own B-tree, and version 3.0 followed in June 2004, made possible in part by developers at AOL.
Phone makers came next: Motorola, then Symbian, which chose SQLite after a bake-off against nine other engines, then the team building Android. Shipping on millions of devices exposed bugs, so Hipp adopted the aviation software standard DO-178B and spent a year of 60-hour weeks writing tests until every branch was covered. Today SQLite is likely used more than all other database engines combined.
Why it’s built this way
- A library inside the program, not a server
- The Informix outages showed that a separate server is one more thing that can fail. SQLite was designed to run without installing a database system or needing an administrator.
- Compile SQL into bytecode for a small virtual machine
- Hipp had built compilers before, so he treated each SQL statement as a program: a compiler translates it into bytecode, and a small engine runs that bytecode.
- Flexible column types
- SQLite started as a Tcl extension, and Tcl is dynamically typed, so a column accepts values of other types.
STRICTtables, which reject mismatches, arrived only in 2021. - Public domain, every line written from scratch
- With no licence terms at all, anyone can ship SQLite in anything. To keep it that way, every contributor signs a public-domain dedication, and patches from anyone else aren’t accepted.
Timeline
- 2000
Hipp writes SQLite; version 1.0 is released in August
- 2001
Version 2.0 replaces gdbm with its own B-tree
- 2004
Version 3.0 arrives in June, supported in part by AOL
- 2010
3.7.0 adds write-ahead logging (WAL)
- 2021
STRICTtables offer enforced column types - 2025
SQLite turns 25 with version 3.50.0 in May
- CoRecursive: The Untold Story of SQLite, with Richard Hipp
- SQLite: History of SQLite releases
- SQLite: Release history (gdbm backend replaced in 2.0)
- SQLite: SQLite version 3 overview (AOL credit)
- SQLite: The advantages of flexible typing (began as a Tcl extension)
- SQLite: Architecture of SQLite (bytecode virtual machine)
- SQLite: Zero-configuration
- SQLite: SQLite is public domain
- SQLite: Most widely deployed SQL database engine
Sources13 · facts checked 5 October 2026
- SQLite: About
- SQLite: Appropriate uses
- SQLite: Atomic commit survives crashes and power failures
- SQLite: Write-ahead logging
- SQLite: Isolation in SQLite (transactions are serializable)
- SQLite: Limits (maximum database size)
- SQLite: Long term support
- SQLite: Copyright
- SQLite: Most widely deployed database engine
- SQLite: STRICT tables
- Python docs: sqlite3, DB-API 2.0 interface for SQLite databases
- tursodatabase/libsql on GitHub: README (embedded replicas)
- Turso blog: Turso 0.8.0 (Sep 2026)