Facebook Cover Photo Maker
Size a cover photo that works on desktop and mobile.
Convert SVG to a CSS-safe data URI without Base64 bloat.
The encoded version, decoded and drawn
SVG to Data URI produces the CSS-safe URL-encoded form as well as Base64, and shows both sizes — URL encoding is typically 25 to 30 percent smaller and stays readable, so a colour can be changed later without re-encoding. The markup is minified first, which usually saves more than the encoding choice does.
Inlining an SVG in CSS removes a request entirely, and almost everyone does it with Base64 — which is the wrong choice.
SVG is text, so it can be URL-encoded instead, escaping only the handful of characters that would break a CSS url() value. The result is typically 25 to 30 percent smaller than Base64 and stays readable, so a colour can be changed later without re-encoding the whole thing. Both are produced here with their sizes side by side. The minifier runs first, since stripping editor metadata usually saves more than the encoding choice does.
Typically 25 to 30 percent smaller, because SVG is text and Base64 adds a third for nothing.
Fill values are still readable in the URL-encoded string, so a colour change is a find and replace.
Editor metadata is stripped before encoding, which usually saves more than either encoding choice.
The two encodings side by side, so the smaller one is obvious rather than assumed.
The encoded version is decoded and drawn, so a broken escape shows immediately.
Or load a file. It is minified first.
URL-encoded and Base64, with the size of each.
A complete background-image rule, or just the URI.
The encoded version is rendered back, so a broken escape is visible.
Because SVG is text and Base64 adds 33 percent for nothing. URL encoding only escapes the few characters CSS cannot take, and comes out 25 to 30 percent smaller.
The hash, angle brackets, quotes and percent signs at minimum. Using single quotes for attributes inside the SVG avoids escaping the double quotes around the url() value.
With URL encoding, yes — the fill values are still readable in the string, so a find and replace works. With Base64 the whole thing has to be re-encoded.
No hard limit, but past a few kilobytes a separate cached file is better. Inlining is for small icons and patterns.
What people who use the SVG to Data URI think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the SVG to Data URI. It takes half a minute and no account.
Write the first reviewSize a cover photo that works on desktop and mobile.
Crop to 1:1, 4:5, 16:9, 9:16 or any ratio you type.
Work out ratios and missing dimensions without an image.
Open a Photoshop PSD in your browser, layers included — no Photoshop needed.
Flatten a photo into cartoon colours with bold outlines.
Turn every page of a PDF into a PNG or JPG.
Wash an image with a single colour at any strength.
Crop a photo with a draggable frame or exact pixel values.