SVG Optimizer
Paste SVG code or open an .svg file and it is optimized on the spot without changing how it looks: the example icon is 2,626 bytes and comes out at 780 bytes with the default settings, 1,846 bytes (70.3%) smaller. Metadata, editor data from Inkscape or Illustrator, comments, unused ids, empty and default attributes and surplus digits go, and the viewBox always stays. If your file has a <style>, a <script>, a <foreignObject> or animation, those are kept exactly and the rules that could break them stay off, with a notice. Both versions are drawn side by side as images, you get the gzip size, and the file is read on this page only.
Updated Runs in your browser: nothing you enter is uploadedHow this tool works
Replace the example: paste SVG code, or open or drop an .svg file (up to 1 MB). It is processed as you type.
The file is read by your browser and never uploaded or saved. Reload the page and it is gone.
Result
Optimized: 2,626 → 780 bytes, −1,846 bytes (−70.3%)
Kept or skipped for safety
Preview
Both are drawn as images, so nothing inside the file can run. They should look the same.
There is nothing to draw yet.
Size
- Before (UTF-8)
- 2,626 bytes (2.6 KB)
- After (UTF-8)
- 780 bytes
- Change
- −1,846 bytes (−70.3%)
- Before, gzip estimate
- —
- After, gzip estimate
- —
What changed
- XML declaration and DOCTYPE removed: 2
- Comments removed: 1
- Metadata elements removed: 1
- Editor elements removed: 1
- Editor attributes removed: 6
- Unused namespace declarations removed: 5
- Empty attributes removed: 1
- Default values removed: 11
- Unused ids removed: 8
- Whitespace-only text nodes removed: 21
- Numbers shortened or rounded: 41
Default values removed
- display="inline" × 1
- gradientUnits="objectBoundingBox" × 1
- offset="0" × 1
- opacity="1" × 1
- opacity="1.0" × 1
- stop-opacity="1" × 1
- stop-opacity="1.0" × 1
- x1="0%" × 1
- x="0" × 1
- y1="0%" × 1
- y="0" × 1
Going on from here: turn the result into a data URI for CSS or HTML, or minify the stylesheet that an SVG with a style block keeps.
What each setting saves on the example icon
| Setting | Bytes after | Saved | What it does |
|---|---|---|---|
| Remove the XML declaration and DOCTYPE | 2,474 | 152 | Drops <?xml …?> and the DOCTYPE. A DOCTYPE that declares entities or attribute defaults the file uses is kept. |
| Remove comments | 2,569 | 57 | Drops <!-- … --> comments, except those that start with an exclamation mark. |
| Remove metadata (RDF, license blocks) | 2,205 | 421 | Drops <metadata> and RDF, Creative Commons and Dublin Core elements, then the prefixes nothing uses. |
| Remove editor data (Inkscape, Illustrator, Sketch) | 2,090 | 536 | Drops elements, attributes and style declarations written by Inkscape, Illustrator, Sketch and Affinity. |
| Remove empty attributes | 2,617 | 9 | Drops blank class, style and presentation or geometry attributes. |
| Remove default values (opacity="1", x="0") | 2,460 | 166 | Drops attributes that repeat a default which is never inherited (opacity="1", x="0" on a rect). |
| Also inherited defaults (fill="black"): for images only | 2,571 | 55 | Also drops defaults of inherited properties (fill="black", stroke-width="1") when nothing above them differs. |
| Collapse whitespace | 2,351 | 275 | Drops indentation between elements and spaces inside tags; text content keeps every space. |
| Shorten numbers | 2,411 | 215 | Rounds path data and lengths to the chosen decimals and writes every number in the fewest characters. |
| Remove unused ids | 2,488 | 138 | Drops ids that no url(#…), href, xlink:href or aria-* attribute points at. |
| Remove width and height (the viewBox stays) | 2,597 | 29 | Drops width and height from the root <svg>; the viewBox stays. |
| Default settings together | 780 | 1,846 | Every setting except inherited defaults and dimensions, which change more than the file size. |
Each rule on a small file
| Input | Settings | Result | Why |
|---|---|---|---|
| <!-- logo v2 --><path d="M1 1h8"/> | Remove comments | <path d="M1 1h8"/> | A comment is not drawn. One that starts with an exclamation mark, such as a license line, stays. |
| <!--! MIT --><!-- draft --><path d="M1 1h8"/> | Remove comments | <!--! MIT --><path d="M1 1h8"/> | The <!--! license --> form is kept on purpose. |
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" viewBox="0 0 10 10"><metadata><rdf:RDF/></metadata><path d="M1 1h8"/></svg> | Remove metadata | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><path d="M1 1h8"/></svg> | The <metadata> block and the RDF prefix it needed go. It holds license text, so keep a copy if you must credit the author. |
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="0 0 10 10"><g inkscape:label="Layer 1" inkscape:groupmode="layer"><path d="M1 1h8"/></g></svg> | Remove editor data | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><g><path d="M1 1h8"/></g></svg> | Attributes in the Inkscape namespace are matched by their address, not by the prefix, and the unused xmlns:inkscape goes too. |
| <path class="" fill="" d="M1 1h8"/> | Remove empty attributes | <path d="M1 1h8"/> | A blank class or presentation attribute is ignored by browsers, which is what no attribute means too. |
| <g lang="" data-state="" href=""><path d="M1 1h8"/></g> | Remove empty attributes | <g lang="" data-state="" href=""><path d="M1 1h8"/></g> | A blank lang, data-* or href is not the same as none, so these stay. |
| <rect x="0" y="0" width="5" height="5" opacity="1"/> | Remove default values | <rect width="5" height="5"/> | x, y and opacity on a rect repeat the default. |
| <path fill="#000" stroke="none" d="M1 1h8"/> | Remove default values | <path fill="#000" stroke="none" d="M1 1h8"/> | fill and stroke are inherited, so they stay unless the inherited-defaults setting is on. |
| <path fill="#000" stroke="none" stroke-width="1" d="M1 1h8"/> | Inherited defaults on | <path d="M1 1h8"/> | Nothing above the path sets these, so black, none and 1 are what it would inherit anyway. |
| <g fill="red"><path fill="#000" d="M1 1h8"/></g> | Inherited defaults on | <g fill="red"><path fill="#000" d="M1 1h8"/></g> | The group sets red, so the path's black is not redundant and stays. |
| <defs><linearGradient id="g"/></defs><path id="p" fill="url(#g)" d="M1 1h8"/> | Remove unused ids | <defs><linearGradient id="g"/></defs><path fill="url(#g)" d="M1 1h8"/> | url(#g) uses g, nothing uses p. |
| <symbol id="icon"><path d="M1 1h8"/></symbol><g id="spare"/> | Remove unused ids | <symbol id="icon"><path d="M1 1h8"/></symbol><g/> | Other files can link to a symbol as sprite.svg#icon, so symbol, view and nested svg ids stay. |
| <path d="M 1.50000 2.00000 L 8.12345 9.00060"/> | Shorten numbers, 3 decimals | <path d="M1.5 2L8.123 9.001"/> | Rounded half away from zero on the digits as written, then written in the fewest characters. |
| <path d="M1 1a2 2 0 011 1"/> | Shorten numbers, 3 decimals | <path d="M1 1a2 2 0 0 1 1 1"/> | The two arc flags are single characters, so "011" is read as 0, 1, 1 and written with spaces. |
| ⏎ <g> ⏎ <text x="1" y="5">a <tspan>b</tspan> c</text> ⏎ </g> ⏎ | Collapse whitespace | <g><text x="1" y="5">a <tspan>b</tspan> c</text></g> | Indentation between elements goes; the spaces inside the text are part of what is drawn and stay. |
| <style>.a{fill:red}</style><path id="p" class="a" opacity="1" d="M1 1h8"/> | All defaults, <style> present | <style>.a{fill:red}</style><path id="p" class="a" opacity="1" d="M1 1h8"/> | Selectors in the style may use the id, the class or the opacity, so ids, empty attributes and default values stay. |
| <foreignObject x="0" y="0" width="10" height="10"><p xmlns="http://www.w3.org/1999/xhtml"> Hi <b>there</b> </p></foreignObject> | All defaults, <foreignObject> present | <foreignObject x="0" y="0" width="10" height="10"><p xmlns="http://www.w3.org/1999/xhtml"> Hi <b>there</b> </p></foreignObject> | Embedded HTML is copied untouched, whitespace included. |
| <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M8 8h32"/></svg> | Remove width and height | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="M8 8h32"/></svg> | The viewBox keeps the proportions; the image now fills whatever size the page gives it. |
Decimal places against file size
| Decimal places | Bytes after | Saved | Largest error per number |
|---|---|---|---|
| 0 | 726 | 1,900 | ±0.5 |
| 1 | 762 | 1,864 | ±0.05 |
| 2 | 776 | 1,850 | ±0.005 |
| 3 | 780 | 1,846 | ±0.0005 |
| 4 | 790 | 1,836 | ±0.00005 |
| 5 | 790 | 1,836 | ±0.000005 |
| 6 | 790 | 1,836 | ±0.0000005 |
How numbers are rounded
| Written as | 0 decimals | 1 decimal | 2 decimals | 3 decimals | 6 decimals |
|---|---|---|---|---|---|
| 1.0005 | 1 | 1 | 1 | 1.001 | 1.0005 |
| 2.675 | 3 | 2.7 | 2.68 | 2.675 | 2.675 |
| -0.0004 | 0 | 0 | 0 | 0 | -.0004 |
| 123.4567 | 123 | 123.5 | 123.46 | 123.457 | 123.4567 |
| 0.5 | 1 | .5 | .5 | .5 | .5 |
| 9.9995 | 10 | 10 | 10 | 10 | 9.9995 |
| 1e-5 | 0 | 0 | 0 | 0 | .00001 |
| 1234567.8915 | 1234568 | 1234567.9 | 1234567.89 | 1234567.892 | 1234567.8915 |
Attribute values counted as the default
| Attribute | Default value | Inherited | Applies to | Removed by |
|---|---|---|---|---|
| x on <svg> | 0 | no | <svg> | Remove default values |
| y on <svg> | 0 | no | <svg> | Remove default values |
| preserveAspectRatio on <svg> | xMidYMid meet | no | <svg> | Remove default values |
| x on <rect> | 0 | no | <rect> | Remove default values |
| y on <rect> | 0 | no | <rect> | Remove default values |
| x on <image> | 0 | no | <image> | Remove default values |
| y on <image> | 0 | no | <image> | Remove default values |
| preserveAspectRatio on <image> | xMidYMid meet | no | <image> | Remove default values |
| x on <use> | 0 | no | <use> | Remove default values |
| y on <use> | 0 | no | <use> | Remove default values |
| preserveAspectRatio on <symbol> | xMidYMid meet | no | <symbol> | Remove default values |
| cx on <circle> | 0 | no | <circle> | Remove default values |
| cy on <circle> | 0 | no | <circle> | Remove default values |
| cx on <ellipse> | 0 | no | <ellipse> | Remove default values |
| cy on <ellipse> | 0 | no | <ellipse> | Remove default values |
| x1 on <line> | 0 | no | <line> | Remove default values |
| y1 on <line> | 0 | no | <line> | Remove default values |
| x2 on <line> | 0 | no | <line> | Remove default values |
| y2 on <line> | 0 | no | <line> | Remove default values |
| x1 on <linearGradient> | 0 | no | <linearGradient> | Remove default values |
| y1 on <linearGradient> | 0 | no | <linearGradient> | Remove default values |
| y2 on <linearGradient> | 0 | no | <linearGradient> | Remove default values |
| x2 on <linearGradient> | 100% | no | <linearGradient> | Remove default values |
| gradientUnits on <linearGradient> | objectBoundingBox | no | <linearGradient> | Remove default values |
| spreadMethod on <linearGradient> | pad | no | <linearGradient> | Remove default values |
| gradientUnits on <radialGradient> | objectBoundingBox | no | <radialGradient> | Remove default values |
| spreadMethod on <radialGradient> | pad | no | <radialGradient> | Remove default values |
| offset on <stop> | 0 | no | <stop> | Remove default values |
| clipPathUnits on <clipPath> | userSpaceOnUse | no | <clipPath> | Remove default values |
| opacity | 1 | no | any element | Remove default values |
| stop-opacity | 1 | no | any element | Remove default values |
| flood-opacity | 1 | no | any element | Remove default values |
| stop-color | black (also #000, #000000, rgb(0,0,0)) | no | any element | Remove default values |
| flood-color | black (also #000, #000000, rgb(0,0,0)) | no | any element | Remove default values |
| display | inline | no | <svg> <g> <path> <rect> <circle> <ellipse> <line> <polyline> <polygon> <text> <tspan> <image> <use> <a> <switch> | Remove default values |
| clip-path | none | no | any element | Remove default values |
| mask | none | no | any element | Remove default values |
| filter | none | no | any element | Remove default values |
| mix-blend-mode | normal | no | any element | Remove default values |
| isolation | auto | no | any element | Remove default values |
| vector-effect | none | no | any element | Remove default values |
| dominant-baseline | auto | no | any element | Remove default values |
| baseline-shift | baseline | no | any element | Remove default values |
| unicode-bidi | normal | no | any element | Remove default values |
| text-decoration | none | no | any element | Remove default values |
| fill | black (also #000, #000000, rgb(0,0,0)) | yes | any element | Also inherited defaults |
| fill-opacity | 1 | yes | any element | Also inherited defaults |
| fill-rule | nonzero | yes | any element | Also inherited defaults |
| clip-rule | nonzero | yes | any element | Also inherited defaults |
| stroke | none | yes | any element | Also inherited defaults |
| stroke-opacity | 1 | yes | any element | Also inherited defaults |
| stroke-width | 1 | yes | any element | Also inherited defaults |
| stroke-linecap | butt | yes | any element | Also inherited defaults |
| stroke-linejoin | miter | yes | any element | Also inherited defaults |
| stroke-miterlimit | 4 | yes | any element | Also inherited defaults |
| stroke-dasharray | none | yes | any element | Also inherited defaults |
| stroke-dashoffset | 0 | yes | any element | Also inherited defaults |
| visibility | visible | yes | any element | Also inherited defaults |
| text-anchor | start | yes | any element | Also inherited defaults |
| font-style | normal | yes | any element | Also inherited defaults |
| font-weight | normal (also 400) | yes | any element | Also inherited defaults |
| letter-spacing | normal | yes | any element | Also inherited defaults |
| word-spacing | normal | yes | any element | Also inherited defaults |
| shape-rendering | auto | yes | any element | Also inherited defaults |
| text-rendering | auto | yes | any element | Also inherited defaults |
| image-rendering | auto | yes | any element | Also inherited defaults |
| color-interpolation | sRGB | yes | any element | Also inherited defaults |
| color-interpolation-filters | linearRGB | yes | any element | Also inherited defaults |
| pointer-events | visiblePainted | yes | any element | Also inherited defaults |
| paint-order | normal | yes | any element | Also inherited defaults |
| direction | ltr | yes | any element | Also inherited defaults |
| marker-start | none | yes | any element | Also inherited defaults |
| marker-mid | none | yes | any element | Also inherited defaults |
| marker-end | none | yes | any element | Also inherited defaults |
| cursor | auto | yes | any element | Also inherited defaults |
Namespaces treated as editor data or metadata
| Source | Namespace address | Removed by |
|---|---|---|
| Inkscape | http://www.inkscape.org/namespaces/inkscape | Remove editor data |
| Sodipodi (Inkscape) | http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd | Remove editor data |
| Adobe Illustrator and Adobe extensions | any address starting with http://ns.adobe.com/ | Remove editor data |
| Sketch | any address starting with http://www.bohemiancoding.com/sketch/ | Remove editor data |
| Serif Affinity | http://ns.serif.com/, or any address starting with http://www.serif.com/ | Remove editor data |
| RDF | http://www.w3.org/1999/02/22-rdf-syntax-ns# | Remove metadata |
| Creative Commons | http://creativecommons.org/ns# or http://web.resource.org/cc/ | Remove metadata |
| Dublin Core | http://purl.org/dc/elements/1.1/ or http://purl.org/dc/terms/ | Remove metadata |
Worked examples: eight typical files
| File | Bytes before | Bytes after | Saved | What stays |
|---|---|---|---|---|
| Inkscape leaf icon | 1,778 | 665 | 1,113 (62.6%) | The gradient the fill uses and its id; the viewBox. |
| Illustrator export with DOCTYPE entities | 1,363 | 924 | 439 (32.2%) | The DOCTYPE, because xmlns="&ns_svg;" needs its entity; the foreignObject block untouched. |
| Sketch export | 1,078 | 569 | 509 (47.2%) | The title and desc text, and the stroke and fill that differ from the default. |
| Figma-style stroke icon | 528 | 508 | 20 (3.8%) | Everything that matters: root fill="none", the clip path and its id. |
| Icon sprite with symbols | 816 | 674 | 142 (17.4%) | The ids of the symbols, the view and the nested svg. |
| Bar chart styled with a <style> block | 903 | 841 | 62 (6.9%) | The style block, every id, class and opacity (a notice says why). |
| Animated spinner (SMIL) | 821 | 723 | 98 (11.9%) | The animation elements, their ids and begin targets. |
| Text logo with gradient, clip path and mask | 918 | 786 | 132 (14.4%) | The spaces inside the text, the gradient chain, mask and clip path references. |
When the optimizer holds back
| The file has | Kept as written | Switched off for that file |
|---|---|---|
| A <style> element or an xml-stylesheet link | The stylesheet, every id, class and attribute | Unused ids, empty attributes, default values |
| A <script> element | The script and every attribute it could read | Unused ids, empty attributes, default values |
| Event attributes such as onclick | The attributes and what they call | Unused ids, empty attributes, default values |
| Animation (<animate>, <set>, <animateTransform>) | The animation and the ids it targets | Unused ids, empty attributes, default values |
| A <foreignObject> | Everything inside it, whitespace and ids included | All rules, inside it only |
| <use> elements | Inherited properties on shapes that may be instanced | Inherited defaults |
| Ids on <symbol>, <view> or a nested <svg> | Those ids | Unused ids, for them only |
| A DOCTYPE with entities or attribute defaults | The DOCTYPE | Prolog removal, for the DOCTYPE only |
| Text, tspan, title, desc | Every space and line break inside | Whitespace collapse, inside them only |
How to optimize an SVG file online
- Add your SVG. Paste the code into the box, or press Open an .svg file (or drop a file on the box). Files up to 1,048,576 bytes (1 MB) are accepted.
- Choose the settings. The defaults remove metadata, editor data, comments, unused ids, empty and default attributes and extra digits. Change the decimal places for path data, or turn a setting off if you need what it removes.
- Read the notices. If the file has a style block, a script, animation or embedded HTML, the notices say what was kept and which settings were skipped for safety.
- Compare the preview. The original and the optimized SVG are drawn next to each other as images. They should look the same; the sizes and the gzip estimate show what you saved.
- Copy or download. Copy the optimized code, or download it as an .svg file named after your input. Nothing is uploaded at any step.
Frequently asked questions
- Will optimizing change how my SVG looks?
- The settings that are on by default only remove things a browser does not draw (comments, metadata, editor data, blank attributes, ids nothing refers to) or write the same value in fewer characters. The one lossy step is rounding numbers: three decimals is far below a pixel for icons drawn on a 24 to 100 unit grid, but a very large or very small viewBox may need more or fewer. Compare the two previews, and lower the setting if you see a difference.
- Why was nothing removed from my file with a style block?
- A <style> element can select by id, class, attribute and element name, so removing an id, a class or an attribute that looks unused or redundant could change which rule applies. With a <style> (or a linked stylesheet, a script, event handlers or animation) the optimizer keeps the file's ids, empty attributes and default values, and still removes comments, metadata, editor data and whitespace and rounds numbers. The style text itself is copied exactly; minify the CSS separately.
- When should I turn off "Remove unused ids"?
- Turn it off if something outside the file refers to its ids: a page that links to sprite.svg#icon, CSS or JavaScript on the page that inlines this SVG and selects #logo, or a tool that expects layer names. Ids on <symbol>, <view> and nested <svg> elements are kept automatically because sprites are linked that way. Ids that url(#id), href, xlink:href or aria-labelledby inside the file point at are always kept.
- Why are fill="black" and stroke-width="1" still there?
- Both properties are inherited, so a value that equals the default is only redundant when nothing around the SVG sets it. If the SVG is inlined in a page whose CSS says svg { fill: currentColor }, an explicit fill="#000" on a shape is what keeps it black. The setting "Also inherited defaults" removes them when you know the SVG is used as an image or a file; it still keeps a value when an ancestor in the file sets another one, and does nothing when the file has <use> elements.
- How many decimal places should I keep?
- For icons on a 16 to 64 unit grid, 2 or 3 is plenty. For larger drawings, maps and charts with a viewBox in the thousands, 1 or 2 is enough, because one unit is a small fraction of the picture. For tiny viewBoxes such as 0 0 1 1, keep 4 to 6. The error table above gives the largest movement of a single number; because relative path commands (lowercase letters) add up, very long relative paths drift a little more than absolute ones.
- Is this different from SVGO?
- SVGO is a command-line optimizer with a long list of plugins that can also convert shapes to paths, merge paths and move attributes between elements. This page implements a smaller set of rules that never restructure the drawing: it removes, respells and rounds, and leaves the element tree, the order of elements and the path commands as they are. That makes the result easy to diff against your source, at the price of leaving some bytes on the table.
- What does the preview prove?
- Both versions are handed to the browser as images, the same way an <img> tag would show them, so scripts in the file cannot run and nothing is loaded from other addresses. If the two pictures look alike at the size you use, the optimization did not change the drawing there. An <img> does not run the animation scripts or fetch fonts and pictures that the file refers to; if your SVG depends on those, test the downloaded file in its real page too.
- What is the gzip number?
- It is an estimate made with your browser's built-in compression of the text before and after. Web servers usually send SVG compressed, so the compressed size is what a visitor downloads, and it shrinks less than the raw size because repeated markup compresses well already. A server may use a different gzip level or Brotli, so treat the figure as a guide to the comparison, not a promise. If the browser has no compression support the line is left out.
- What happens when I remove width and height?
- The image no longer has a fixed size of its own. It fills the width a page gives it (an <img> with no CSS size shows at a default size) and keeps its proportions from the viewBox. This is the usual choice for responsive icons. If the file has no viewBox but plain pixel sizes, one is made from them first; if neither can be used, the sizes are kept and a notice says so.
- Why does my SVG say it cannot be read?
- The messages name the line and column. The usual causes are a closing tag that does not match, an & that is not part of an entity (write &), an entity such as that XML does not define (use  ), a prefix like xlink: used without declaring xmlns:xlink, a missing xmlns="http://www.w3.org/2000/svg" on the <svg> (browsers will not draw the file as an image without it), and an XML declaration that is not the very first thing in the file. The browser's own parser is asked as well, and its message is shown if it disagrees.
- Does it remove the title and desc elements?
- No. <title> and <desc> are what screen readers announce and what a browser shows as a tooltip, so they are treated as content. An aria-labelledby that points at a title keeps the title's id. If you want them gone for a decorative image, delete them in the code box first.
- Is my file sent anywhere, and what is the size limit?
- The code is processed by script on this page, held in memory for as long as the page is open and dropped when you reload; the drawing of both versions goes through blob addresses made in your browser. Input is limited to 1,048,576 bytes (1 MB), measured as UTF-8, so the page stays responsive; a larger file is refused before anything is read.
How it works
The text is read into a tree by a small XML 1.0 reader that keeps every string exactly as written (entity references are never decoded) and resolves namespaces, because editor data is recognised by its namespace address and not by its prefix. The browser's DOMParser (image/svg+xml) is asked about the same text, and a file either one rejects is not processed. Each setting is a removal or a respelling. Whether a rule may run is decided by the file: a style element, a linked stylesheet, a script, an event handler or animation turns off the rules that depend on ids, classes and attribute values; a foreignObject is copied untouched; xml:space and text elements keep their whitespace. Defaults are the initial values from the SVG property index; properties that are inherited are handled separately because a value equal to the default is only redundant when no ancestor, no CSS and no instancing <use> supplies another. An id counts as used when a url(#id), href, xlink:href, aria-labelledby or similar attribute anywhere in the file points at it. Numbers are rounded as decimal text, half away from zero, never through binary floating point; path data is read with the SVG path grammar, including arc flags that touch the next number, and written with the fewest separators. Opacities, offsets, transforms and the viewBox are only respelled (1.0 to 1), never rounded, because rounding them would change the picture. After the rules run, the result is parsed again; if it were not well-formed the page would refuse to show it. Sizes are UTF-8 byte counts.
Sources
More free tools
- Image to Base64 ConverterTurn an image into a Base64 data URI with ready HTML, CSS and Markdown snippets and exact sizes, or decode Base64 back to an image. Runs in your browser.
- Favicon GeneratorMake a favicon from an image, text or an emoji: PNGs from 16 to 512 px, favicon.ico, an SVG icon, the HTML link tags and a ZIP. Runs in your browser.
- XML Formatter & ValidatorCheck XML is well-formed with the exact line and column of any error, then pretty-print with 2 spaces, 4 spaces or a tab, or minify. Runs in your browser.
- CSS Minifier & BeautifierMinify CSS safely or beautify it with 2 or 4 space indents. Strings, url() and calc() stay intact. Shows bytes saved and gzip size. Runs in your browser.
- Network Ports ReferenceSearch common TCP and UDP port numbers by number, range or service name: 22 SSH, 443 HTTPS, 3306 MySQL and more, with secure variants and IANA status.
- IP Address ConverterConvert an IPv4 address to a decimal integer, hex or binary and back, expand or compress IPv6, and see its reverse DNS name and whether it is private.
More: Web, URLs, images and networkAll developer toolsAll toolsHome & DIY calculators