Developer Tools
Base64 Encoder & Decoder
Encode and decode Base64 with correct UTF-8 and URL-safe variants.
Text input
0 charsResult
no outputResult appears here.
About Base64 Encoder / Decoder
Base64 turns arbitrary bytes into a text-safe alphabet, which is why it shows up in HTTP basic auth headers, data URLs, message queue payloads and encoded secrets in configuration. The classic failure is mangling non-ASCII characters by calling the wrong encoding function.
This tool converts text through UTF-8 bytes before encoding, so accented characters and emoji survive the round trip. Decoding accepts both standard and URL-safe alphabets, with or without padding, and rejects sequences that are not valid Base64.
How it works
- Text is converted to UTF-8 bytes, then encoded with the standard Base64 alphabet.
- URL-safe mode swaps + and / for - and _ so the result can live in a query string or filename.
- Decoding accepts missing padding and either alphabet, and normalises before conversion.
- The decoded bytes are interpreted as UTF-8 so multi-byte characters are restored correctly.
- A file can be read locally and converted into a Base64 data URL for embedding.
Input and output
Accepts
Plain text, a Base64 string, or a small local file.
Produces
The encoded or decoded value, plus the byte length of the result.
Privacy
Encoding and decoding run in the browser. Files you select are read locally and never uploaded.
Base64 Encoder / Decoder FAQ
Does Base64 encrypt my data?
No. Base64 is a transport encoding, not encryption. Anyone can decode it in one step, so never treat Base64 as protection for secrets.
Why does Base64 make data larger?
Base64 encodes three bytes into four characters, so the encoded size is roughly 33 percent larger than the original.
When should I use URL-safe Base64?
Whenever the value travels inside a URL, cookie, filename or JWT. Standard Base64 contains + and /, which have special meanings in those contexts.
Why did my decoded text turn into question marks?
The original bytes were probably not UTF-8 text, for example a binary file or a Latin-1 encoded string. Decode it as bytes in the tool that produced it instead.