Tools
SVG to Base64 / Data URI
Paste an SVG and copy the encoded string.
How to encode
- Paste your SVG on the left.
- Pick the output mode (base64 / data URI / CSS).
- Copy the result.
About base64 encoding
Base64 turns binary bytes into a string of safe characters. A data URI additionally includes the mime type so the browser knows how to decode it.
Frequently asked questions
What is a data URI?
A URL that embeds the file contents directly, prefixed with the mime type.
Should I base64-encode my icons?
For tiny icons, inline SVG is usually lighter. Data URIs are best when you need a CSS background.
Is the encoding reversible?
Yes — use the Base64 to SVG tool to decode.