Base64 encoder & decoder
Encode or decode Base64 and Base64url.
Enable JavaScript to use this interactive tool. Paste input, choose options, then copy or download the result, or save it to your notebook.
Example and common questions
Encode a UTF-8 message for a text-based transport, or inspect bytes from a Base64 field. The accented character below demonstrates why text encoding matters. For binary input or decoded bytes that are not UTF-8, choose hexadecimal instead of text.
How to encode text or decode binary bytes
- Choose encode or decode, then select UTF-8 text or hexadecimal bytes.
- Choose standard padded Base64 or unpadded URL-safe Base64url, then paste the source and run the tool.
- Copy or download the result; Base64 encoding does not encrypt its contents.
Encode accented UTF-8 text
- Direction
- encode
- Text or bytes
- utf8
- Base64 alphabet
- standard
caféY2Fmw6k=Is Base64 encryption?
No. Base64 is reversible encoding; it does not protect the encoded contents with a password or encryption key.
When should I choose hexadecimal?
Choose hexadecimal to work with binary bytes, or when decoded bytes are not valid UTF-8 text. Each byte is represented by two hexadecimal digits.
Which Base64 format is accepted?
Choose standard for padded Base64, or URL-safe for unpadded Base64url (using - and _). Both ignore ASCII spaces, tabs and line breaks. Mixed alphabets and noncanonical padding bits are rejected.
Common errors and limitations
Check padding and Base64 characters, including noncanonical padding bits. Invalid UTF-8 needs hexadecimal output. Hexadecimal input needs complete pairs of hexadecimal digits.