Base64 Encoder and Decoder
Encode or decode Base64, including the URL-safe variant.
Uses - and _ instead of + and /, and drops the = padding.
Everything is processed in this tab. Nothing you paste is sent anywhere.
Every tool runs entirely in your browser. Your files are never uploaded to a server.
Base64 represents binary data using 64 printable characters so it can travel through systems that expect text. Encoding makes data about 33 percent larger. It is an encoding, not encryption — anyone can decode it instantly.
How to use Base64 Encoder & Decoder
- Paste your text or Base64. Encoding and decoding both happen as you type.
- Choose the direction. Encode turns text into Base64; decode turns it back.
- Switch alphabet if needed. URL-safe swaps + and / for - and _ so the result survives a query string.
About Base64 encoding
Base64 exists because a great many systems were built to carry text and will corrupt anything else. Email bodies, JSON string values, XML attributes, HTTP headers and URLs all have characters with structural meaning, and arbitrary binary will sooner or later contain a byte that breaks them. Base64 sidesteps this by using only letters, digits and two symbols, at a cost of roughly a third more size. The most consequential misunderstanding about it is security. Base64 is not encryption, obfuscation or hashing; it is a public, reversible mapping with no secret involved. Credentials encoded into a Base64 string are exactly as exposed as they were in plain text, which is why HTTP Basic authentication — which is Base64 and nothing else — is considered safe only over HTTPS. The second common trap is Unicode. The browser primitive underneath most implementations works on bytes and rejects any character above U+00FF, so naive tools either throw or silently corrupt anything non-English. Encoding text to UTF-8 bytes first is the correct handling, and it is why an emoji or an accented name pasted here comes back exactly as it went in.
Frequently asked questions
Is Base64 a form of encryption?
Why does my decoded text have strange characters?
What is URL-safe Base64?
Why did my data get bigger?
Last updated