← All text tools

SVG to data URI

Turn an SVG into a data URI for CSS backgrounds or <img> tags.

  • Free
  • No sign-up
  • Works on any device

About SVG to data URI

Turn an SVG into a data URI to use in a CSS background-image or an img src, avoiding an extra file request. URL-encoded SVG is usually smaller than Base64, which adds about a third. Small icons suit inlining well, while large images are better as separate cacheable files.

How to use SVG to data URI

  1. Type or paste your text in the box above.
  2. The result appears instantly as you type.
  3. Copy the result or download it as a file.

Why use this tool?

Also known as

Frequently asked questions

Is Base64 or URL-encoded SVG smaller?

URL-encoded is usually smaller, because Base64 inflates data by about 33 percent. Base64 is still safer in some old tools.

Is SVG to data URI free?

Yes. SVG to data URI on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Related tools