filerepair
All Tools ▾
Developer Favorite · Private & Free

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.

Drop your SQLite (.db) file here
Drag & drop anywhere or press⌘V·100% on-device · never leaves your browser
Try a sample:

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

  1. Restores corrupted 16-byte "SQLite format 3" magic headers and auto-detects page size (1024–65536 B).
  2. Aligns truncated trailing pages and synchronizes header page-count metadata.
  3. Scans B-tree table leaf pages (0x0D) and freelist pages to carve schema definitions and deleted text fragments.

Exact Error Codes & System Messages Fixed

SQLite3 / Python / Node
sqlite3.DatabaseError: database disk image is malformed (Error Code 11: SQLITE_CORRUPT)
SQLite3 CLI
Error: file is not a database (Error Code 26: SQLITE_NOTADB)
Plex / Radarr / Sonarr / Uptime Kuma
SQLite Error 11: database corruption at page ... / PRAGMA integrity_check failed
Anki / Obsidian / Mobile Apps
Unable to open database file — trailing page truncated after cloud sync conflict

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