DEV Community

Steven Yang
Steven Yang

Posted on

Salvaging Corrupted SQLite, dBase (.dbf), and MS Access (.mdb) Files in the Browser with Rust + WASM

Legacy and embedded databases have a habit of breaking at the worst possible moment — right after a sudden power loss, a truncated cloud sync, or a crashed desktop app.

When you search for a repair utility, almost every result either asks you to install a shady Windows binary or upload your private .sqlite, .dbf, or .mdb database to a remote server.

Over the past few weeks, we built a 100% browser-based binary recovery workbench in Rust compiled to WebAssembly (~300 KB gzipped) at FileRepair so damaged databases can be inspected and rebuilt locally in RAM with zero uploads.

1. SQLite B-Tree Page Recovery

When a SQLite file's 100-byte header or interior B-tree pointer gets corrupted, sqlite3 refuses to run queries (database disk image is malformed). Instead of relying on the SQLite engine, our SQLite repair tool scans 4 KB pages directly for intact table leaf pages (0x0D), parses varint cell payloads, and reconstructs clean SQL/CSV/JSON exports right in the browser.

2. dBase / FoxPro (.dbf) Header & Tombstone Repair

Accounting and GIS workflows still rely on .dbf tables. Common failures include mismatched 32-bit record counts, missing 0x1A EOF markers, and uncompacted 0x2A deleted-record tombstones. Our DBF repair engine recalculates the exact record count from actual file bytes, compacts deleted rows, and outputs both a repaired .dbf and structured CSV/JSON/SQL.

3. Microsoft Access (.mdb / .accdb) Page Carving

Even without Microsoft Access installed on macOS or Linux, our Access database recovery tool reads Jet 4 / ACE page headers, extracts table definitions (TDEF), and falls back to forensic page carving when system catalogs are damaged.

Beyond Databases: Office, Audio, and Privacy Scrubbing

The same Rust + WASM engine also repairs truncated ZIP/DOCX/XLSX/PPTX archives, 0-byte WAV recordings, Garmin FIT tracks, and EPUBs — plus includes an offline 40+ format magic-byte file identifier and a lossless 15-format metadata remover.

Everything runs completely offline once loaded. Try it out at https://filerepair.app and let me know what obscure broken formats you would like to see supported next!

Top comments (0)