Encode and decode Base64 for free in your browser
Encode or decode Base64 as you type, including URL-safe Base64 and data URLs. You can also turn a file into Base64 or save decoded Base64 as a file.
How to use Base64 Encoder & Decoder
- Choose Encode or Decode, then type or paste your text. To encode a file, drop or choose it instead.
- Copy the result. If decoded Base64 is a file, such as an image, save it.
Questions
- Can it decode URL-safe Base64?
- Yes. Input that uses - and _ instead of + and / is decoded, and missing = padding and line breaks are fine too.
- How do I turn Base64 back into an image or file?
- Paste the Base64 or a data: URL in Decode mode. If the result isn't text, the tool detects the file type (PNG, JPEG, GIF, WebP, PDF or ZIP, or the type in the data URL) and offers it as a download, for example decoded.png.
- How do I convert a file to Base64 or a data URL?
- Drop, paste or choose any file. Choose Data URL for a value you can put in an HTML src or CSS url(), or Base64 only for just the encoded bytes. Then copy it or save it as a .txt file.
- Does it handle emoji and accented characters?
- Yes. Text is encoded as UTF-8 before Base64 encoding, so emoji and accented characters come back exactly when decoded.
- Is there a size limit?
- There's no fixed limit. Large inputs and files are handled in pieces. For very long results, only the beginning is shown on screen, but Copy and Save always include the whole result.