What is the SVG to Base64 & Data URI Converter?
Putting a small SVG straight into your CSS saves a web request and keeps your icon in one file. This tool makes the data URI for you, as a ready CSS line, an img tag, a CSS mask or the plain string.
You can choose URL-encoded or Base64. URL-encoded is usually about a third smaller and works in every modern browser. A live preview shows your picture, and the sizes of both versions are shown so you can pick.
How to use it
- Paste your SVG code, or open an .svg file.
- Pick URL-encoded or Base64, and the output style.
- Copy the CSS, HTML or string.
Why people like this tool
URL-encoded or Base64
See both sizes and pick the smaller.
Ready CSS
background-image, img tag or mask.
Live preview
Check your SVG before you copy.
Cleans first
Removes comments and extra spaces.