Short answer
This tool settles the "file format or file extension is not valid" error by reading your file's real format locally: an HTML or CSV export mislabeled as .xlsx just needs a free rename, not a repair, while a genuinely damaged .xlsx gets its surviving sheet data salvaged and rebuilt into a working workbook. It runs entirely in your browser — the file is read and processed on your machine with 0 bytes uploaded, which you can confirm in your browser's Network tab. The limit: values, formulas, and sheets recover from the readable parts, but formatting, charts, and macros may not, and an encrypted or 0-byte file is out of reach.
Excel file won't open? Find out which problem you have
- Drop the file
- Local check: what it really is
- Rename it — or repair it
This error has two causes: the extension doesn't match what's inside, or the file is a real .xlsx with damaged structure. The tool above settles it instantly — it reads the file's actual format locally and tells you whether you need a free rename or a repair. Either way, the file never leaves your machine.
The exact errors, decoded
Excel cannot open the file 'name.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.This is the mismatch error: Excel looked inside and found contents that don't match what a .xlsx should contain. Note the message's own second sentence — Microsoft is telling you the extension itself is a suspect. Most of the time, this file isn't corrupted at all.
The file is corrupt and cannot be opened.This sibling is the damage error: Excel recognized the file as its own format but couldn't parse it. One caveat: on some systems this message comes from an over-strict Protected View setting rather than real damage — if the file fails only on your machine, check File → Options → Trust Center before assuming corruption.
Cause 1: the extension doesn't match the file — free fix
The classic case: a web app's "Export to Excel" button produced an HTML table or a CSV and named it report.xlsx. Excel opens it, sees markup instead of a workbook, and refuses. Other variants: an old-format .xls renamed to .xlsx somewhere along the way, or the reverse.
The fix is renaming: free, no software. Really HTML? Rename to .html. CSV? .csv. An old Excel file? .xls. Excel then opens it by its true format, and you can save a genuine .xlsx from there. The tool above detects the real format, so you're not renaming by trial and error, and no repair is involved, because nothing is broken.
Cause 2: the workbook is genuinely damaged
If the tool confirms the file is a real .xlsx and still unreadable, you're in repair territory. Try Excel's free path first: File → Open → Browse, select the file, click the arrow next to the Open button, and choose Open and Repair — Repair mode first, Extract Data mode second.
When Excel's repair fails, archive-level salvage is the next step: an .xlsx is a ZIP of XML parts, so surviving sheet data can be pulled from a broken container and rebuilt into a working file, right here in your browser; the mechanics are on the Excel repair page. Work on a copy, and stop re-saving the damaged original; every save risks overwriting data salvage could reach.
What this can and can't fix
If the file was never an xlsx (an HTML or CSV export in disguise), repair is the wrong verb, and the honest fix is the rename above; the tool identifies the real format instead of pretending to repair it. Genuine corruption follows the Excel repair limits: cell values, formulas, and sheets recover from readable parts; formatting, charts, macros, and anything in destroyed parts may not; encrypted workbooks still need their password; and a 0-byte file is a data-recovery problem, not a repair problem. A failed repair is never charged.