SVG Optimizer
Strip comments, metadata and editor namespaces from an SVG and collapse redundant whitespace. Shows exactly how many bytes were saved.
svg0 ln / 0 ch
optimised
readymarkup only / no rendering change
local / nothing uploadedAbout this tool
Shrink an exported SVG by removing the parts that only mattered to the editor. Comments, metadata and private namespaces go first, then whitespace, then optional coordinate rounding.
How to use it
- Paste the SVG source.
- Toggle which categories to strip.
- Read the byte saving in the status bar.
- Copy the result into your project or build step.
Examples
An Inkscape export
<!-- Created with Inkscape --><svg xmlns:inkscape="...">
Comments and private namespaces removed
Limits and notes
- Rounding coordinates can change rendering at large scale.
- Embedded fonts and images are left untouched.
Frequently asked questions
- Can this break accessibility?
- Removing title and description removes the accessible name. Keep them if the graphic conveys meaning.
- How much is usually saved?
- Simple icons often shrink by a third; complex artwork less, because the path data dominates.
- Should I round coordinates?
- For icons, yes. Preview first if the artwork has fine detail.
- Is anything rendered here?
- No. The tool works on markup only.
Want the details? Read the full guide: Why an Icon From a Design Tool Is 40KB.
Related Tools
Base64 ImagePreview a base64 image and turn it back into a data URI, or drop in an image file to encode it. Detects PNG, JPEG, GIF, WebP and BMP from the bytes themselves.
JSON ValidatorValidate JSON syntax with detailed error messages. Catch trailing commas, missing brackets, and syntax errors instantly before sending payloads to your API.
JSON FormatterBeautify, validate, minify, and view JSON. Format messy API responses into readable code or compress it to save bandwidth, running safely in your browser.
JSON MinifierCompress JSON to a single line. Remove all unnecessary whitespace and line breaks to reduce payload size for production APIs without altering the underlying data.
JSON ViewerView JSON in an interactive, collapsible tree structure. Easily navigate massive API responses, expand specific nodes, and inspect deeply nested objects or arrays.
XML FormatterFormat and validate XML documents. Add proper indentation, catch malformed tags, and minify XML markup for optimized data transfer in SOAP APIs or RSS feeds.
HTML FormatterBeautify HTML markup. Apply consistent indentation and line breaks to unreadable or minified HTML, making it easier to review, debug, and maintain web pages.
CSS FormatterBeautify CSS stylesheets. Organize selectors, properties, and media queries with standard indentation, transforming compressed production CSS into readable code.