# SVG to Base64

> SVG to Base64 encodes a vector graphic as a data:image/svg+xml;base64 link or as plain Base64. It runs in your browser, so your files are never uploaded.

Page: https://ishowpdf.com/tools/svg-to-base64

## What SVG to Base64 does

SVG to Base64 encodes a vector graphic as a data:image/svg+xml;base64 link or as plain Base64. Front-end developers use it for icons in CSS backgrounds, favicons and email templates, where shipping a separate file is awkward.

Pick an .svg file and the encoded text appears straight away. The SVG markup is kept exactly, so the graphic stays sharp at any size once the browser draws it. Copy the result or save it as a text file.

## How to use SVG to Base64

1. **Choose an SVG**: Select the .svg icon or logo you want to embed.
2. **Pick the output**: Keep the data: link for CSS and HTML, or remove it for plain Base64.
3. **Paste it in**: Copy the text into your stylesheet, HTML or template.

## Questions

**Should I use Base64 or URL-encoding for SVG in CSS?**

Both work in browsers. Base64 is simpler to paste safely, while URL-encoded SVG is often a little shorter. This tool makes Base64.

**Will my SVG still scale?**

Yes. It is still a vector image once the browser decodes it.

**Can I decode it back to SVG later?**

Yes. Paste the text into Base64 to SVG to get the file back.

**Is my SVG uploaded?**

No. Your browser encodes it locally, so the file stays on your device.

More free tools: https://ishowpdf.com/tools
