How it works
- Select an SVG and inspect the sanitized preview.
- Choose raw Base64 or Data URI.
- Convert the sanitized markup.
- Copy the result for your controlled development workflow.
Practical example
Data URI mode produces data:image/svg+xml;base64,... so the sanitized graphic can be used as an image source without a separate file request.
Formula and explanation
Base64 does not rasterize the vector: it encodes the sanitized SVG text as UTF-8 bytes. Decoding recovers vector markup and its scalability.
A Data URI includes the image MIME prefix; raw Base64 contains only encoded bytes. Embedding grows size by about one third and can reduce cache efficiency, so it is most useful for small self-contained assets.
Active elements and external references are removed before encoding. This is not encryption, and anyone with the Base64 can decode the SVG.