Workspace Files stay on your device
images · svg
SVG to Data URI
Base64 data:image/svg+xml URI of the exact SVG bytes — paste it into a CSS url() or an <img src>. Decoding the URI returns the original file byte for byte.
A little guidance. A better result.
How to use SVG to Data URI
Base64 data:image/svg+xml URI of the exact bytes — decodes back to the original file.
Prepare your input
Choose an SVG file.
Use the workspace
Generate its Base64 data URI.
Check your result
Test the URI in the intended image or CSS context.
Know the limits
Encoding does not sanitize SVG content. Content-security policies can restrict data URIs.
Where does my input go?
This browser tool processes your input on your device. Optional analytics is a separate choice; it is not needed to use the tool. Keep your original until you have checked the result.
Read the privacy details →Made for the work in front of you.Report a problem ↗