Guide
Optimizing Images and SVG in the Browser
A practical way to inspect, convert, resize, compress and optimize images and SVG locally without uploading them.
Most image work — converting a format, resizing, compressing, reading metadata or rasterising an SVG — can run entirely in your browser, so the file never has to be uploaded.
01A safe order of operations
- Inspect the file first: read its container, dimensions and metadata before changing anything.
- Resize before compressing when you need a smaller file, because fewer pixels always shrink the payload.
- Convert the format last, at the quality you actually need, and compare the before/after byte sizes.
02Choosing a format
PNG is lossless and keeps transparency, JPEG is widely compatible, and WebP usually gives the smallest file at a given quality. AVIF can be smaller still, but encoding it depends on the browser.
AVIF is best-effort
A browser that cannot encode AVIF will report that clearly instead of producing a mislabelled file.
03SVG is not a raster image
SVG is markup. Optimize it conservatively — comments, editor metadata and whitespace — and export it to PNG only when a raster format is genuinely required.
Limitations
AVIF encoding depends on the browser, lossy conversion always re-encodes pixels, and the SVG optimizer deliberately does not rewrite geometry or path data.
Frequently asked questions
- Are my files uploaded?
- No. These tools read and process the file locally in your browser; nothing is sent to a server.
- Why did my optimization save so little?
- The SVG optimizer is deliberately conservative: it removes only content that cannot change the rendered result, so path data and definitions are left intact.
Sources
- PNG (Portable Network Graphics) Specification, Third Edition — W3C (accessed 2026-07-05)
- RFC 9649 — WebP Image Format — IETF (accessed 2026-07-05)
Test this in your browser
The tool runs entirely in your browser; the input you use never leaves it.
About the author
Gampangin builds and maintains free, browser-based developer tools and the documentation that makes them trustworthy. The organization is accountable for every page published on this site.