Live preview
Quick pointers to get the smallest, cleanest output for your project.
Convert an SVG into a ready-to-paste CSS background-image. The SVG is embedded as a data URI, so there are no extra HTTP requests and the graphic stays crisp at any resolution.
Base64 is the most compatible encoding and works everywhere. URL-encoded data URIs are usually smaller for SVGs because the markup stays human-readable. Toggle between them to see which is shorter for your file.
Paste a CSS rule or a data URI and instantly get the original SVG markup back. Handy for editing an icon that's already inlined in a stylesheet or component.
Enable “Minify / optimize SVG” to strip metadata, comments and redundant attributes. Smaller SVGs mean shorter data URIs and lighter CSS.
Every conversion runs locally — nothing is uploaded. Your SVGs never leave your machine, so it's safe for private icons, logos and brand assets.
Inline small icons, loaders and repeating background patterns directly in CSS. It's perfect for design systems, email templates and single-file components.
I'm Jim, the founder, designer & engineer behind the MagicPattern toolbox.
For many years, I was struggling to create engaging visuals for products, branding and interfaces. Their creation required pro design skills or many hours of practice.
That's why I build MagicPattern. My mission is to help people create pro graphics with no effort and no prior design knowledge.

©2026 MagicPattern. Founded by Jim Raptis