Design Tools

SVG to CSS Background — Data URL / Base64

Inline SVG into a CSS background-image: url(...) string using URI encoding or Base64. Useful for small icons you want to keep in CSS instead of separate asset files.

DesignCSSSVGFrontend

Favorite this tool

No favorite storage mode has been selected.

Quick actions

Copy this tool URL or open the system share sheet on a supported device.

Use cases

  • Inline a small Figma icon into component CSS without a separate asset file

How to use

  1. Paste full SVG markup on the left; review the escaped one-line output and live preview on the right

Example input and output

SVG code

<svg>X</svg>

CSS

url(data:image/svg...)

FAQ

Is Base64 or URI encoding better?

URI encoding (without Base64) is usually smaller after escaping and remains more readable in DevTools.

Tools

Related tools

Continue with another translated tool for a nearby task.

Aspect Ratio Calculator

Aspect Ratio and Proportional Size Calculator

Available

Compute and lock an aspect ratio in your browser. Derive a ratio from width and height, or change one side while the other stays proportional. Includes common presets and a preview for cropping, video frames, and responsive layouts.

Ratio Size Design