Base64 Encoder for SVG

Your data never leaves your browser

Embed SVG icons as Base64 data URLs in CSS to eliminate icon HTTP requests.

Example

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" stroke="#059669"><polyline points="20 6 9 17 4 12"/></svg>

Tips

  1. 1CSS: background-image: url('data:image/svg+xml;base64,...').
  2. 2URL-encoding often smaller for SVGs.
  3. 3Minify SVG first.

Frequently Asked Questions

Base64 or URL-encode?

URL-encoding usually smaller. Base64 for compatibility.

Animated SVGs?

Yes, preserved.

Max size?

Keep under 10KB for performance.