Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to readable text.
A data URL embeds a file directly in CSS, HTML or JSON, removing a separate request. For small icons and placeholders that is convenient; for photographs it bloats the document, because Base64 is about a third larger than the binary.
Encode an image file to a data URL, or paste a data URL (or raw Base64) and decode it back into a downloadable image. Nothing is uploaded.
Runs locally in your browser — nothing is uploaded.
Small assets that are needed immediately and cached with the document: icons, logos, tiny placeholders. Avoid it for anything large.
Base64 encodes three bytes as four characters, so the result is about 33% larger than the file, plus the data URL prefix.
The payload must be an image format the browser can display (PNG, JPEG, WebP, GIF, SVG). Arbitrary Base64 will not render.
Data URLs remove a request but move the bytes into the document, where they cannot be cached separately and are re-downloaded with every HTML response. That trade is worth it for a small logo and a bad deal for a hero photo.
SVG can be embedded either as a data URL or inline; inline SVG can be styled with CSS and is usually smaller. For raster icons, an SVG favicon or a separate file is often the better long-term choice.