File Doctor — Repair & Recover Files
Drop a broken or "won't open" file and fix it in your browser: correct a wrong extension, trim junk bytes, rebuild a damaged ZIP/Office archive or PDF, and remux a media file that won't play. Nothing is uploaded — everything runs locally.
How to Use
- Drop the broken file in (or click to browse). Any file works — it's read locally, never uploaded.
- Read the diagnosis: what the file really is, and what's wrong with it.
- Click the suggested repair — fix the extension, trim junk, or rebuild the structure.
- Download the repaired file and try opening it again.
File Doctor — Repair & Recover Files
Drop a broken file or click to browse
Any file — it's read & repaired in your browser, never uploaded
A repair shop for broken files — in your browser
Drop in a file that won't open, downloaded wrong, or got flagged as "damaged," and File Doctor reads what it really is from its magic bytes, checks its structure top and bottom, and tells you plainly what's wrong. Then it offers the fix: correct a wrong or missing extension, trim junk bytes added before or after the real file, rebuild the index of a damaged ZIP or Office document, re-serialize a broken PDF, or remux a media file whose container won't play. Everything happens locally — the file is never uploaded — so it's safe for private documents and footage.
What it can and can't do
It can fix structure. A huge share of "corrupt" files aren't missing data at all — they have a wrong extension, a few stray bytes from a bad download, or a damaged table-of-contents while the real content is intact. Those are exactly what File Doctor rebuilds.
It can't invent data that was never written. If a transfer stopped halfway and the rest of the file simply doesn't exist, no tool can reconstruct it — and you should be wary of any site that claims otherwise (especially one that wants you to upload the file first). File Doctor is honest: when a file looks truncated, it says so, and recovers whatever is present rather than pretending.
Reference
Worked Example
A JPEG with 37 junk bytes in front. A 1,204,837-byte file does not begin with the JPEG signature FF D8 FF. File Doctor scans the first 256 KB (262,144 bytes) for a known signature and finds it at byte 37, so it reports "37 junk byte(s) before the file". Trimming keeps bytes 37 to the end, 1,204,837 − 37 = 1,204,800 bytes, otherwise byte for byte identical.
A PNG named holiday.jpg. The first eight bytes are 89 50 4E 47 0D 0A 1A 0A, the PNG signature, so the tool reports a PNG image with the wrong extension and offers "Fix the extension (→ .png)". Nothing inside the file changes; only its name does.
The common mistake: expecting a repair to bring back missing data. A JPEG should end with FF D9 and a PNG with the 8-byte IEND chunk. If that marker is missing, the file was cut short, and the missing bytes were never saved. The rebuild options then recover what is readable, but no tool can restore the lost part.
Show Work
Formulas
Why Files Break
Most file formats begin with a "magic number", a fixed run of bytes that says what the file is. The PNG signature is a good example of how they are designed: its first byte, 0x89, is outside plain ASCII, and the 0D 0A 1A 0A that follows would be altered by a program that converts line endings, so a damaged transfer shows up straight away.
A ZIP archive keeps its table of contents, the central directory, at the end of the file, and readers look for it there first. A download cut short therefore often makes a ZIP, DOCX or XLSX "corrupt" even though most entries are intact; re-reading the entries and writing a fresh central directory is the repair. A PDF works the same way with its cross-reference table of object positions, and a video can fail to play because its index is missing or malformed while the pictures and sound are still in the file.
About This Tool
File Doctor reads a file's real format from its signature, checks the start and end, and offers only the repairs that fit: fix the extension, trim bytes before or after the file, rebuild a ZIP or Office archive with JSZip, re-save a PDF with pdf-lib to write a new cross-reference table, remux a media file with ffmpeg, or re-encode a damaged image to a clean PNG. It supports PNG, JPEG, GIF, BMP, WebP, PDF, ZIP, MP4/MOV, WebM/MKV, WAV, FLAC, OGG and MP3.
The file is loaded into your browser's memory and repaired there; nothing is uploaded. Related tools: File Inspector, ZIP / Unzip Tool, and Hex Editor.
Frequently Asked Questions
Is my file uploaded anywhere?
No. "Drop a file to fix" means it's loaded into your browser's memory and repaired with local code — it never leaves your device, and nothing is stored. That's important for files you can't risk sending to a stranger's server.
What can it actually fix?
Structural and container damage: a wrong or missing file extension, junk bytes added before or after the real file, a damaged ZIP / Office (docx/xlsx/pptx) archive index, a broken PDF cross-reference table, and media files that won't play because the container is malformed (a remux usually fixes those).
What can't it fix?
It can't bring back data that is genuinely gone. If a download stopped halfway and the second half of the file was never written, or bytes were overwritten with zeros, no tool — local or online — can reconstruct the missing content. File Doctor will tell you honestly when a file looks truncated rather than pretend it fixed it.
My file opens but looks wrong / has a weird extension.
Drop it in — File Doctor reads the real format from the file's magic bytes, so it catches things like a “.jpg” that is actually a PNG, or a file with no extension at all, and offers to rename it correctly.
How is this different from File Inspector?
File Inspector reads and analyses a file in depth (formats, metadata, forensics). File Doctor is the repair shop: it focuses on finding what's wrong and producing a fixed copy you can download.
How do I use the File Doctor — Repair & Recover Files?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Does it cost anything or need an account?
No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.
Is anything I type uploaded?
No. The tool works entirely on your device, so the values you enter never leave your browser.
Common Use Cases
Won't-open download
A file that downloaded with junk or a wrong extension and won't open.
Corrupt ZIP / Office file
Rebuild the index of a damaged .zip, .docx, .xlsx or .pptx.
"Damaged" PDF
Rebuild a broken PDF cross-reference table so it opens again.
Video that won't play
Remux a malformed MP4/MKV container so players accept it.
Mystery / no-extension file
Identify the real format and give it the correct extension.
Last updated: