What is the SQLITE3 file format?
A .sqlite3 file is a SQLite 3 relational database - a complete, self-contained, serverless database stored in a single cross-platform binary file. The format is identified by the 16-byte null-terminated header string SQLite format 3 at byte offset 0, shared by every SQLite 3 database regardless of file extension.
Data is organised in fixed-size B-tree pages (default 4,096 bytes; the actual page size is recorded in header bytes 16-17) using big-endian integers. The first page always contains the sqlite_schema table - a catalogue of all tables, indexes, views and triggers in the database.
The .sqlite3 extension is one of several conventions for the identical binary format; .sqlite, .db, .db3 and .s3db files are byte-for-byte the same. A database in WAL mode (write-ahead logging) generates companion -wal and -shm sidecar files that must be kept alongside the main file.
SQLite 3 has no built-in encryption; optional encryption is available via the commercial SQLite Encryption Extension (SEE) or the open-source SQLCipher library. Schema and data can be exported to a .SQL script using the sqlite3 shell's .dump command.
SQLite is the most widely deployed database engine on Earth - it ships inside Android, iOS, macOS, every major web browser, and countless embedded devices. The SQLite team guarantees long-term format stability: a file written today is intended to remain readable for decades.
Security & safety
RISK: MEDIUMA .sqlite3 file is data, not executable code - opening it in a viewer is safe. Treat the CONTENTS as sensitive: app and browser SQLite databases commonly store private messages, contacts, browsing history, session tokens and location data. Do not upload personal databases to online viewers. Never run SQL from untrusted sources against your database (it can DELETE data). Be aware companion -wal/-shm files may exist with the newest uncommitted changes; keep them with the main file.
Format details
in a nutshellPrograms that open SQLITE3 files
Technical details
deep spec| File signature | 53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00 - "SQLite format 3" (null-terminated) at byte offset 0 |
| Byte order | Big-endian (header and B-tree page integers) |
| Page size | 512-65,536 bytes per page (default 4,096 B); stored in header bytes 16-17 |
| Storage engine | Custom B-tree paged storage (not a generic container format) |
| Text encoding | UTF-8 (code 1), UTF-16LE (code 2) or UTF-16BE (code 3); recorded in the database header |
| Encryption | None by default; available via SQLite Encryption Extension (SEE) or SQLCipher |
| WAL mode | Adds -wal (write-ahead log) and -shm (shared memory) companion files when enabled |
| Schema catalog | sqlite_schema table on the first page lists all tables, indexes, views and triggers |
| Integrity check | PRAGMA integrity_check performs full B-tree scan; no automatic embedded checksum |
| Typical size | A few KB (empty) to many GB; no hard upper limit |
| STRICT tables | SQLite 3.37.0+ (2021) supports STRICT tables for enforced column typing |
| Associated OS | Windows, macOS, Linux, Android, iOS, embedded systems |
| Released | 2004 (SQLite 3 file format; SQLite itself since 2000) |
| Latest version | SQLite file format version 3 (stable; backwards-compatible since 2004) |
| Open standard | Yes · royalty-free |
| Specification | www.sqlite.org |