Encode and Decode UTF-8 Text with Base64
Convert text to standard Base64 or URL-safe Base64, and decode either form back to UTF-8 text. This is a text tool, not a binary file converter.
How to Encode and Decode Base64
- Enter plain text and select Encode for standard Base64, or URL Safe Encode for Base64URL.
- To decode, paste the encoded text and select Decode or URL Safe Decode.
- Copy the result, or swap input and output to check a round trip.
Text and Unicode Examples
Text is converted to UTF-8 bytes before encoding. Chinese characters and emoji are supported. Standard encoding includes padding where needed; URL-safe encoding omits it.
Text: Hello
Base64: SGVsbG8=
Text: 你好
Base64: 5L2g5aW9
Text: 🚀
Standard Base64: 8J+agA==
URL-safe Base64: 8J-agAStandard Base64 and Base64URL
Base64URL replaces + with - and / with _. Both decode buttons accept these URL-safe characters, remove whitespace, and restore missing padding when the length permits it.
A Base64 payload can contain arbitrary bytes, but this decoder requires valid UTF-8. Binary images, compressed files and text encoded in other character sets may fail to decode. Remove a data URL prefix such as data:text/plain;base64, before decoding its payload.
Base64 Is Encoding, Not Encryption
Anyone with an encoded value can decode it without a password. Base64 provides neither confidentiality nor proof that data is authentic. Use an appropriate encryption scheme when confidentiality is required.
Frequently Asked Questions
Why does Base64 decoding fail?
The input may contain invalid characters, impossible padding or a truncated payload. Decoding also fails when the resulting bytes are not valid UTF-8. Removing whitespace cannot repair missing data.
Can this tool decode a JWT?
It can decode an individual Base64URL text segment, such as a JWT header or payload. Do not paste the entire dot-separated token. Decoding does not verify its signature or establish that its claims are trustworthy.
Is Base64 the same as URL encoding?
No. Base64 represents bytes using a text alphabet. Percent encoding escapes characters in URL components. Standard Base64 may require escaping when used in a URL; Base64URL uses a different alphabet.
Where is conversion history stored?
This page keeps up to ten conversions in memory. Reloading the page clears that history. Conversion runs locally; third-party analytics and advertising scripts also load on the website.