How to Fix “File Format or Extension Is Not Valid” — Excel, Word, PDF and More

The file format or extension is not valid error (and its siblings — “the file is corrupt and cannot be opened”, “the file format and extension of .xlsx don’t match”) means one precise thing: the application opened the file, looked at the first bytes, and they didn’t match the format the extension promised. The data inside is often completely fine. What usually broke is the container — the ZIP-style wrapper every modern Office file lives inside — or the file was simply truncated by a failed download or an interrupted cloud sync.

The good news: because the “format” check is just a header inspection, the most common causes are mechanical, and most of them are fixable in a browser tab in seconds — no upload, no “free” repair site that wants your contract, no installs. The repair tools are embedded directly in this guide, one per format. Drop your file into the tool in the section matching your situation.

First: 60 seconds of triage, before any repair

Run down this list in order — it separates “wrong app” cases (nothing to repair) from genuinely damaged ones:

  1. Does the extension match the app? A .xls (legacy binary) opened in a parser that only reads .xlsx throws exactly this error. Try the sibling format or export a fresh copy.
  2. Was the file emailed, messaged or downloaded? Partial downloads are the #1 cause. Re-copy the original and compare sizes before concluding the file is damaged.
  3. Is it locked into a preview? Files previewed in pane viewers sometimes arrive renamed (document(1).pdf with no real PDF bytes). Get it onto disk and try again.
  4. Still failing? The container is genuinely damaged — the per-format repairs below apply.

“Excel cannot open the file because the file format or extension are not valid”

Excel’s variant of this error is almost always a broken ZIP container: an .xlsx is literally a ZIP archive of editable XML (sheets, shared strings, styles), and the failure mode is the ZIP index at the end of the file being mangled — which happens whenever a download stops halfway, a USB drive de-syncs or a saving app crashes mid-write. The XML sheets themselves usually survived, which is why an aggressive re-download sometimes “fixes” it by luck. A structure rebuild is the reliable version of that luck:

Embedded — usable right here: Repair a corrupted Excel file (full page)

Drop the damaged file here

or click to choose — XLSX,XLSM,ZIP · rebuilt on your device, never uploaded

Rebuilding in your browser…

Scanning entries and healing XML — nothing uploaded

The tool rescans the raw file for readable entries (it doesn’t trust the broken ZIP index), recovers every intact sheet, repairs truncated XML and writes a clean .xlsx. Everything happens in your browser — the workbook with your payslips does not get uploaded anywhere.

Word: “the file is corrupt and cannot be opened” / “Word found unreadable content”

Word’s variant has the same ZIP anatomy: .docx is a container, and the document body lives in an XML part inside it. If Word refuses the container, the text is usually still there:

Embedded — usable right here: Repair a corrupted Word document (full page)

Drop the damaged file here

or click to choose — DOCX,ZIP · rebuilt on your device, never uploaded

Rebuilding in your browser…

Scanning entries and healing XML — nothing uploaded

If the recovered document opens but one paragraph is missing, that paragraph was physically never written to the disk — no tool can conjure data that isn’t in the file. Everything that is in the file is what gets healed.

PDF: “there was an error opening this document. the file is damaged…”

PDF corruption is different in shape: the cross-reference table — the index telling the viewer where each page object lives — lives at the end of the file, which makes it the first thing to die in truncated downloads. Content pages, fonts and images are almost always intact earlier in the file:

Embedded — usable right here: Repair a corrupted PDF (full page)

Drop the damaged PDF here

or click to choose — scanned and rebuilt on your device, never uploaded

Rebuilding in your browser…

Scanning objects and rebuilding the cross-reference table

Download repaired PDF

This repair rebuilds only the index — your pages are byte-for-byte untouched, then handed back as a structurally valid document that any viewer accepts.

ZIP: “the archive is either in unknown format or damaged”

Same disease, different patient: the ZIP central directory (the index at the end of the archive) is gone or scrambled. Every entry carries its own local header, so the recovery scans for those instead of trusting the index:

Embedded — usable right here: Repair a corrupted ZIP file (full page)

Drop the damaged file here

or click to choose — ZIP · rebuilt on your device, never uploaded

Rebuilding in your browser…

Scanning entries and healing XML — nothing uploaded

Each recovered entry is verified against its stored CRC checksum, so you’ll know exactly what survived and what was skipped.

Video: “cannot play this video” / “the file is not a valid multimedia file”

If the broken file is an MP4 or MOV, the failure is usually in the moov/mdata box structure — the container boxes that index the picture and sound. A repair approach lives here:

Embedded — usable right here: Repair a corrupted MP4 video (full page)

Drop the damaged video here

or click to choose — MP4/MOV structure rebuilt on your device, never uploaded

Rebuilding in your browser…

Walking the box structure — nothing uploaded

The honest limits are stated inside the tool itself: when the final moov index is what got cut off, the playback index is beyond any tool’s recovery — the tool detects that and says so instead of returning a file that pretends to work.

The one thing NOT to do before trying a repair

Don’t rename the extension hoping the app will “try harder.” Renaming tells the app what to expect, not the file what to contain — a .docx extension on truly PDF bytes still fails and now you’ve also confused the diagnosis. Repair the container first; rename only when a tool has confirmed the underlying bytes belong to a different format.

Prevention, briefly

  • Emails and chat attachments: download, don’t work in preview. Preview panes are the most common producer of half-files.
  • Before closing a document you edited, let the save finish — the last 10% of a .xlsx write is the container index, the exact part the error complains about.
  • Keep the originals. A repair produces a recovered copy; the original damaged file stays as evidence of what it was.

Frequently asked questions

Can the “file format or extension is not valid” error mean malware?
Almost never. The error is raised by the app itself when the bytes in the file don’t look like the format it expected — a damaged container, a wrong extension or a partial download. A file that tricks your app into executing payloads is a different (rarer) failure mode, which is why a repair that only rebuilds structure is safe.
Should I rename the file extension to fix this?
Only when you know the bytes are of another format — renaming a real .xlsx to .docx won’t make Word read it, and wrongly renaming a file OUT of .xlsx can make a fixable file harder to diagnose. Repair the container first.
Will repairing change the contents of my file?
No. The repair tools embedded below scan the raw bytes and rebuild the container around whatever data survived — contents are recovered byte-for-byte, never regenerated or guessed.