An SVG that will not open is three different problems.

Code in a window, a blank canvas, or a refusal — each points somewhere different.

An SVG is a text file, which is why it fails in ways image formats cannot

A PNG is binary and either decodes or does not. An SVG is XML — human-readable markup — so it can be perfectly valid text and still fail to display, and it can display in one program and vanish in another. Seeing markup in a window is not corruption; it is your operating system associating .svg with a text editor, or a server sending it with the wrong content type. A blank canvas means it parsed and rendered nothing, usually a missing or zeroed viewBox. An outright refusal usually means it is not SVG at all, whatever the extension says. The three have nothing in common, and the one you have determines whether this is a thirty-second fix or a re-export.

How to confirm it

You see markup as text
File association or a wrong MIME type. The file is likely fine — the opener is not.
It opens but is blank
Missing or zero `viewBox`/`width`/`height`, or content sitting outside the viewport.
Refused as invalid
Often not SVG — a renamed AI/EPS/PDF, or truncated on download.
Works in a browser, not the editor
Browsers are forgiving parsers. The editor is telling you the markup is malformed.
First-line check
Open in a text editor. It should begin with `<?xml` or `<svg`. Binary noise means it is another format.

The fix

1
Open it in a browser first

Drag the file into a browser tab. That single test separates "the file is broken" from "my opener is wrong".

2
Check the first line in a text editor

If it does not start with `<?xml` or `<svg`, the extension is lying and no SVG tool will open it.

3
Re-generate rather than repair

Malformed markup is rarely worth hand-fixing. Re-trace from the original raster and you get a file that parses everywhere.

Image → SVG · free, no signup

Fix it here.

Upload the original image. The preview shows the real path count before you pay.

3 free previews left · no signup to try

FAQ

Why does it open in Chrome but not Illustrator?

Browsers implement extremely tolerant error recovery — they render what they can and ignore the rest. Illustrator validates the markup properly and refuses on structures a browser silently patches. Browser-only rendering is a reliable signal that the file is genuinely malformed.

It opens as a wall of code. Is it corrupted?

Almost certainly not. That is your operating system opening .svg with a text editor, and the code you are looking at is the file working exactly as designed. Right-click and choose a browser or vector editor instead.

The file downloaded from a website will not open.

Check the size first — a few hundred bytes usually means you saved an error page rather than the file. Also check the first line: some sites serve SVG with a content type that makes browsers save the surrounding HTML.

Can I repair a broken SVG by editing the markup?

Sometimes, if the damage is a single unclosed tag and you can read XML. It is rarely the efficient path. If you still have the source raster, re-tracing takes seconds and produces a file that is valid by construction.

Related problems