←

Image to Base64 and SVG to PNG

Two small converters, both on your device
PNG, JPG, GIF, WebP or SVG, up to 8 MB.

Choose a picture to get its Base64 text.

More info

Image to Base64

Base64 writes the bytes of a file as plain text. Choose a picture and the tool gives you a data URL, which a web page can use in place of a file link, in four forms: the full data URL, the Base64 text alone, a ready-made CSS background-image line, and an HTML <img> tag. Inline pictures save a request, which suits tiny icons and email templates. The text is about a third longer than the file, and the browser can’t cache it separately, so keep inline pictures under roughly 100 KB.

SVG to PNG

Paste SVG code, or open an .svg file, and pick a size. A drawing has no fixed pixel size, so 1× is its declared width and height (or its viewBox) and 4× makes a sharper picture for print or large screens. Choose a transparent, white or colored background and press Download PNG. If the drawing has no width, height or viewBox the tool asks you to add one, because it can’t guess the shape.

Questions

Is anything uploaded? No. Both converters work inside your browser. Why does my SVG show text in the wrong font or no linked pictures? An SVG turned into a picture can’t load fonts or files from other places, so use shapes, convert text to outlines, or embed images as data URLs. Does the SVG’s script run? No, scripts are ignored when an SVG is drawn as a picture. For smaller picture files see the Image Compressor.