Repair SQLite Databases & Scan Deleted Records
Repair corrupted SQLite 3 headers, pad truncated pages, extract sqlite_master schema, and carve readable records from active B-tree & freelist pages.
Common Issues Handled
- "SQLite error: database disk image is malformed"
- "Error: file is not a database"
- "Unexpected EOF / truncated trailing database page after power loss"
How It Works
- Restores corrupted 16-byte "SQLite format 3" magic headers and auto-detects page size (1024–65536 B).
- Aligns truncated trailing pages and synchronizes header page-count metadata.
- Scans B-tree table leaf pages (0x0D) and freelist pages to carve schema definitions and deleted text fragments.
Exact Error Codes & System Messages Fixed
SQLite 3 Page Structure, Freelist Carving & Sync Corruption
A SQLite 3 database is divided into fixed-size pages (typically 4096 bytes). Page 1 begins with a 100-byte header starting with "SQLite format 3\0", followed by B-tree table leaf pages (type 0x0D) storing rows and sqlite_master schema definitions.
When apps like Plex, Sonarr, Radarr, Uptime Kuma, or Anki write to a SQLite database over SMB/NFS network mounts or iCloud/Dropbox sync folders, power loss or concurrent writes can corrupt the 16-byte magic header, misalign the final page, or orphan B-tree pointers — triggering SQLITE_CORRUPT (code 11). Deleted rows also linger inside freelist pages until VACUUM runs.
What Can Be Repaired
- Corrupted or zeroed 16-byte "SQLite format 3" header & mismatched header page count
- Truncated trailing database pages (padded to exact power-of-two page alignment)
- Carving CREATE TABLE sqlite_master schemas directly from B-tree pages
- Scanning unvacuumed freelist pages for deleted text fragments
Honest Limitations
- SQLCipher / AES-encrypted SQLite databases
- Unmerged write-ahead log (.db-wal) changes that were never checkpointed into the main .db file
Frequently Asked Questions
Can FileRepair recover deleted rows from SQLite?
If VACUUM has not been run yet, deleted records often remain inside SQLite freelist pages. FileRepair inspects freelist pages and displays any carved text fragments immediately.
Will this fix Plex, Radarr, Sonarr, or Uptime Kuma "database disk image is malformed" errors?
FileRepair fixes header/page-alignment corruption directly in the .db file and carves surviving table schemas and text rows so you can inspect what survived before running sqlite3 .recover.
Related File Tools
Bypass broken DBF record counters, decode legacy Windows/DOS codepages (CP1252, GB18030, Shift-JIS, CP866), filter soft-deleted rows, and export clean UTF-8 CSV.
Bypass deadlocked Jet/ACE drivers and the 2 GB file-size ceiling. Scan raw Access database pages directly in your browser and salvage records into clean UTF-8 CSV.
Watch died mid-run or Strava rejected your ride? Recalculate FIT header sizes & CRC-16 checksums or fix truncated GPX/TCX tracks locally in milliseconds.
Fix garbled encodings, missing END:VCARD / END:VEVENT tags, and invalid line endings so iCloud, iPhone, and Google import your contacts without errors.