Base64 to Image
Decode Base64 or an image data URL into a locally validated PNG, JPG, WebP, GIF, BMP or ICO image.
Convert an image to a Base64 data URL or raw Base64 text locally, retaining the original encoded file bytes.
Encode an image’s original file bytes as Base64 text for a data field or embedded image. Choose a complete data URL when the destination needs the MIME prefix, or raw Base64 when it expects only the encoded bytes.
Example: Encoding a PNG as a data URL produces text beginning data:image/png;base64, followed by its Base64 bytes.
How it works: Base64 represents each three-byte group as four text characters, with padding when needed. A data URL adds a MIME prefix; this encodes the file bytes rather than compressing or encrypting the image.
The encoded text represents the original selected file bytes; it is not a smaller image and it does not conceal the image content. A Data URL includes a MIME prefix that raw Base64 omits.
An input containing 3 bytes needs 4 Base64 characters before any Data URL prefix. An image with 300,000 bytes therefore needs about 400,000 Base64 characters.
Guidance updated . Methods and corrections
References: rfc-editor.org
Your calculation values and selected files are not stored. Recent and saved tools keep tool identifiers; your market preference keeps only its country code in this browser.
Use the grouped tool selector above the form. Each tool has its own URL, and your browser’s Back button returns to the previous tool.