Free Online SVG to Base64 Converter
Encode SVG to Base64 for free. Get a Base64 string, Data URI, URL-encoded Data URI, CSS background-image and an HTML img tag ready to copy.
- 100% free, no sign-up
- Data URI and CSS ready
- Copy with one click
How to Convert SVG to Base64
-
1
Add your SVG
Paste your SVG code into the box or upload an SVG file.
-
2
Convert
Click Convert. By default the SVG is minified first to keep the result short.
-
3
Copy what you need
Copy the Base64 string, a Data URI, the CSS background-image rule or the HTML img tag.
Frequently Asked Questions
Is this SVG to Base64 converter free?
Yes. The converter is completely free, with no sign-up and no daily limit.
Base64 or URL-encoded Data URI: which should I use?
For SVG, the URL-encoded Data URI is usually shorter, because Base64 makes text about a third longer. Use Base64 when a tool or framework specifically requires it.
How do I use an SVG as a CSS background?
Copy the CSS background-image line and paste it into your stylesheet. The SVG is embedded in the CSS, so no extra file or request is needed.