What is SVG Base64 encoding?
Base64 represents the UTF-8 bytes of an SVG document with a restricted set of text characters. The result can travel inside a data URI, CSS declaration, or HTML image source without referring to a separate file.
How to convert SVG to Base64
Paste complete SVG markup or choose an .svg file, then select Encode SVG. Copy raw Base64 when another system supplies the data-URI wrapper, or copy the complete data URI when you need a ready-to-use source.
How to decode Base64 back to SVG
Switch to Base64 → SVG and paste either raw Base64 or a complete SVG data URI. Decode it, review the readable XML, then copy the exact SVG source or download it as an .svg file.
Base64 vs URL-encoded SVG
Base64 is widely supported and predictable, but it usually makes SVG text larger. URL encoding keeps much of the SVG readable and can produce a smaller CSS data URI. Compare both advanced outputs in the context where you will use them.
When should you embed SVG as Base64?
Inline data is useful for small, self-contained graphics that belong to one component or document. Prefer a normal SVG file when artwork is large, reused across pages, changed independently, or should benefit from browser caching.
Does this tool upload my SVG?
No. Encoding, decoding, size calculations, formatting, and preview preparation run locally in your browser. Your SVG content is not submitted to this site or stored in an account.
Common SVG Base64 problems
Typical problems include copying raw Base64 where a complete data URI is expected, broken Unicode from naive btoa() conversion, unescaped # characters in CSS, incomplete SVG roots, and embedding files that are too large to be useful inline.