Sample SQLite database file: free download

What is a SQLite database file?

A SQLite database is a complete relational database in one ordinary file. It begins with the 16-byte header "SQLite format 3" and a null byte, and stores tables and indexes as B-trees in fixed-size pages, 4,096 bytes by default.

A genuinely valid SQLite 3 database, written byte by byte from source so the file is reproducible. It passes PRAGMA integrity_check and ordinary SELECT queries work.

2 ready-made SQLite test files

FileSizeWhat it catchesDownload
truncated.sqlite5.9 KBError handling for a partially-uploaded or interrupted database transfer. The signature and header validate, so extension and magic-number checks both pass, and opening it does not fail either: SQLite 3.50 reads the missing bytes as zeros and returns every row as (0, NULL, NULL, NULL). Only PRAGMA integrity_check reports the damage.download
users.sqlite8.0 KBDatabase import, upload and inspection paths. Opens in sqlite3, DB Browser, Python and any SQLite driver; PRAGMA integrity_check returns ok and ordinary SELECT/WHERE queries work. Also exercises magic-number detection: the file starts with the ASCII string "SQLite format 3".download

Every file is generated from source (no third-party copyright) and each has its own page with a published SHA-256 you can verify after download.

Questions

Where can I download a sample SQLite database?

The .sqlite file below contains one table with ten rows. It opens in the sqlite3 CLI, DB Browser, Python and any SQLite driver.

How do I test corrupt database handling?

The truncated database has an intact 100-byte header but a cut-short body, so extension and magic-number checks both pass. Opening and querying it does not fail either: SQLite reads the missing bytes as zeros and returns rows of 0 and NULL. Run PRAGMA integrity_check before trusting an uploaded database; it is the only step that reports the damage.

Other formats

Sample DOCX (Word) fileSample TXT and encoding test filesSample XML fileSample YAML fileSample font files (TTF, WOFF, WOFF2)Sample MP3, WAV and MP4 filesSample GeoJSON, GPX and KML filesSample HTML, CSS and JS files