Offline OnlyPrivacy First
Base64 Encoder/Decoder & Image to Base64 Converter
Image/Text ⇆ Base64 Conversion Guide
A Data URI is a scheme that allows you to embed file contents directly into web pages, commonly formatted as
data:image/png;base64,..... It can be used directly in HTML <img> tags or CSS background-image rules.Base64 encoding uses 64 ASCII characters to represent binary data, resulting in a file size increase of approximately 33%. Therefore, it is ideal for small images or icons but not recommended for large files.
No. This tool is smart: if the prefix is present, it identifies the image type; if it is a raw Base64 string, the tool attempts to render it as a PNG image by default.
This usually happens if the copied Base64 string is incomplete (missing end characters or data prefix), contains invalid characters (like spaces or non-Base64 symbols), or the source data is corrupted. Please ensure the string is copied fully and formatted correctly.
In standard Base64, + and / have special meanings in URL parameters (+ translates to spaces, and / acts as a path separator). To prevent parsing errors, RFC 4648 defined URL-safe Base64, which makes the following substitutions:
| Standard Base64 | URL-safe Base64 |
|---|---|
| + | - (Replaced by) |
| / | _ (Replaced by) |
| = | Usually omitted |