Base64 Encoder & Decoder
Encode text to Base64 or decode it back, with the URL-safe alphabet as an option.
Base64 Encoder & Decoder
Result
RGFpbHkgVG9vbHM=
- Could it be decodedYes
- Input size (bytes)11
- Output size (bytes)16
Works out in your browser. Nothing you type is sent anywhere.
In short: Base64 Encoder & Decoder
The text above encodes to the string shown, going in at 11 bytes and coming out at 16, and it decodes back Yes in the other direction. Encoding always grows the data by about a third, because every three bytes of input become four characters of output.
What is Base64 Encoder &?
Base64 writes arbitrary bytes using sixty-four safe characters, so data can travel through channels that only accept text.
How is Base64 Encoder & calculated?
Every three bytes are split into four groups of six bits, and each group becomes one character from the alphabet. Where the data does not divide into three, the output is padded with equals signs. The URL-safe variant swaps the two characters that have meaning in a web address.
- 6 bitsone character of the output encodes six bits of the input
- paddingthe equals signs that fill out the last group
A worked example
| Text or Base64 | Daily Tools |
|---|---|
| Direction | Text to Base64 |
| URL-safe alphabet | No |
| Result | |
| Result | RGFpbHkgVG9vbHM= |
| Could it be decoded | Yes |
| Input size (bytes) | 11 |
| Output size (bytes) | 16 |
Every figure in this table is produced by the same calculation the tool above runs.
How to use this base64 encoder & decoder
- Paste the text or the Base64 string.
- Choose which direction you want.
- Turn on the URL-safe alphabet if the result goes into a web address.
- Copy the result.
Questions people ask
Is Base64 encryption?
No, and treating it as such is a common and serious mistake. Anyone can decode it in seconds, as this page does, so it hides nothing at all. It is an encoding for safe transport, not a protection.
What is the URL-safe alphabet?
It replaces the two characters that have special meaning in a web address with a hyphen and an underscore, and drops the padding. Tokens in URLs and JWTs use it for that reason. Decoding here accepts either form.
Why does the encoded text get longer?
Because every three bytes become four characters, which is about a third more, plus any padding. That is the price of using only safe characters. It is also why embedding large images as Base64 bloats a page.
Why did my decode fail?
Either the string is not valid Base64, often through a missing character or stray whitespace, or it decodes to bytes that are not text, such as an image. This tool decodes to text, so binary data will not come back readable. The message says which happened.
Accuracy and sources
Checked by the Daytoolz team on 16 October 2026. How we check our tools.
Next, people use
- JSON FormatterIndent JSON so you can read it
- Hash GeneratorProduce a SHA hash of any text
- JWT DecoderRead the header and the claims inside a JSON Web Token
- Data Storage ConverterConvert between data sizes
- UUID GeneratorGenerate version 4 or version 7 UUIDs
- QR Code ScannerRead a QR code with the camera or from a picture