Base64 Encode/Decode
The tool automatically identifies the input type: plain text will generate Base64 encoding, valid Base64 will automatically decode to the original text.
Local processing · No File Upload Required
Files are processed in this browser without automatic uploads. Loading processing components for the first time may require an internet connection.
Base64 encoding and decoding: uses and limits
Base64 represents bytes using printable characters. This tool converts UTF-8 text for API debugging, log inspection and checking data fragments.
Base64 is encoding, not encryption. This page only outputs UTF-8 text and does not offer other character set conversions or binary file downloads.
Capabilities explained
Standard Base64 and Base64URL text
Decoding accepts standard Base64 and the Base64URL alphabet with - and _, and restores omitted trailing padding. Encoding produces standard Base64.
Text Data URIs and explicit modes
You can first remove the data:…;base64, prefix before decoding. If the meaning of the input text is ambiguous, select either encoding or decoding mode to avoid relying on automatic detection.
Practical examples
Encode plain text as Base64
Input
Hello
Conversion Result
SGVsbG8=
Encode mode produces the result shown. Enter that result in decode mode to recover Hello.
Decode unpadded Base64URL
Input
8J-Yig
Conversion Result
😊
Decode mode normalizes - to the standard alphabet and restores padding before reading UTF-8 text.
Decode a text Data URI
Input
data:text/plain;base64,SGVsbG8=
Conversion Result
Hello
This example contains text data; it does not imply support for exporting image Data URIs as images.
Usage Steps
Auto Detect
You can choose automatic detection, encoding, or decoding. When the direction is uncertain, use manual mode, then paste the text or Base64 string.
Real-time conversion
The tool automatically identifies the input type: plain text will generate Base64 encoding, valid Base64 will automatically decode to the original text.
Copy with One Click
Each results box includes a 'Copy' button for quickly copying the encoded or decoded content.
Frequently Asked Questions
Why is some content automatically decoded instead of encoded?
Automatic mode decodes Base64 only when it contains valid UTF-8 text; choose encode or decode manually for ambiguous input.
What usually causes decoding failure?
A common cause is that the input is not a complete and valid Base64 string, or invalid characters have been mixed in. First, confirm whether the original content was truncated or had extra content appended.
Can this tool parse a whole JWT or decode images?
It can decode valid UTF-8 Base64URL text fragments, but does not split a whole JWT, verify signatures or export images and other binary files.
