SVG to Data URI

Turn SVG markup into an encoded data URI with a safe local preview.

This tool runs entirely in your browser. The file you choose is never uploaded to a server. Free, with no account required.

Input
SVG markup
Output
Data URI string
Category
Developer Tools
Status
Available now
Price
Free — no subscription, no account

How to use SVG to Data URI

  1. Paste SVG markup.
  2. Review the preview.
  3. Copy the data URI.

Frequently asked questions

Is the output base64?

No. It uses URL-encoded UTF-8, which is usually shorter and readable in source. Both forms are valid image data URIs.

Why was my SVG rejected for preview?

Markup containing script tags, event handlers or javascript: URLs is not previewed. The encoding itself is harmless, but previewing active content would not be safe.

Is anything uploaded?

No. Encoding happens in this tab.

Related tools