tools / svg / svg extract images

SVG Extract Images

Extract embedded base64 PNG/JPEG/GIF/WebP payloads from SVG files, optionally rewriting the SVG to reference the externalized assets.
Runs locally in your browser. Enable JavaScript to use the interactive tool. The practical details remain available below.

What SVG Extract Images actually does

An SVG that is unexpectedly large is usually not a complicated drawing; it is a photograph pasted inside a vector wrapper and stored as base64 text, which costs about a third more than the original file did. Getting those images back out means finding each data URI and decoding it correctly. This extracts every embedded raster as a real file, shows them as a contact sheet with names and sizes so it is obvious what was hiding in there, and can rewrite the SVG to point at the extracted files instead of carrying them.

How to use it

  • Choose the SVG files.
  • Turn on the rewrite option if the SVG should reference the extracted files afterwards.
  • Run it and review the extracted images as a contact sheet.
  • Download an individual image, or take everything as a zip.

Useful for

  • Finding out why an SVG is several megabytes.
  • Recovering a photograph that only survives inside a vector file.
  • Splitting a self-contained SVG into markup plus an assets folder for a build.

Limits worth knowing

  • Only images stored inside the file as base64 data URIs can be extracted. An image referenced by URL is not in the file.
  • Shapes and paths are drawing instructions, not files, and are not extractable as images.
  • The rewrite option changes references to a relative assets path, so the SVG and the extracted folder must then travel together.

Questions people ask

Why does my SVG have no extractable images?

Because it is genuinely vector. Only pasted raster content stored as a data URI comes out as a file.

Are the extracted images re-encoded?

No. The stored bytes are decoded and written as they were, so the image is exactly what was embedded.

What does the rewrite option do?

It replaces each embedded data URI with a relative reference to the extracted file, which is what makes the SVG small.