Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to readable text. Supports Unicode, including international characters and emoji, with browser-based processing.
Enter any text, including Unicode characters and emoji.
The result will appear here. You can select and copy it.
Ready to encode or decode.
Base64 is an encoding format, not encryption. Do not use it to protect passwords, API keys, or other sensitive information.
How to Use the Base64 Encoder and Decoder
This free Base64 encoder and decoder converts text to a standard Base64 string and decodes Base64 back into readable UTF-8 text. Use it to inspect encoded values, prepare text for compatible systems, or troubleshoot data in development workflows.
- Choose a mode. Select Encode to convert text to Base64, or Decode to convert a Base64 value back to text.
- Enter your input. Paste or type your text or Base64 string into the input field.
- Run the conversion. Select the conversion button to generate the result.
- Copy the output. Use Copy output or select the result and copy it manually.
What Is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents bytes using
a set of 64 characters. Standard Base64 uses uppercase and lowercase
letters, digits, plus (+), slash (/), and
the equals sign (=) for padding when needed.
Base64 is commonly used when binary data needs to be represented in a text-based format, such as certain email content, JSON payloads, and data URLs. It is an encoding format, not encryption or compression.
Working with JSON data? Try our JSON Formatter and Minifier to format JSON into a readable structure or minify it.
Base64 Encoding Example
The text Hello, world! converts to the following standard
Base64 value:
SGVsbG8sIHdvcmxkIQ==
Decoding that value returns Hello, world!. The same
process works with Unicode text because this tool converts text to
UTF-8 bytes before encoding it.
Unicode and UTF-8 Support
Text can contain characters that are represented by more than one byte
in UTF-8. This includes many international writing systems, accented
characters, and emoji. The tool encodes the UTF-8 representation rather
than passing the original JavaScript string directly to
btoa().
During decoding, the resulting bytes are interpreted as UTF-8 text. If the decoded bytes are not valid UTF-8, the tool reports an error instead of silently substituting invalid sequences.
Is Base64 Secure?
No. Base64 does not encrypt or protect information. Anyone who has the encoded value can decode it without a secret key. Do not use Base64 as a way to secure passwords, API keys, access tokens, or private information.
Limitations
- This version handles text, not arbitrary binary files.
- Decoded content must be valid UTF-8 text. Binary data may not be readable as text.
- The decoder accepts standard Base64, not the alternative Base64URL alphabet used in some URLs and token formats.
- Very large inputs may use substantial browser memory. Processing performance depends on the device and browser.
Privacy
The conversion logic runs in your browser using JavaScript’s built-in encoding APIs. The tool does not need to send text to a dedicated conversion API or server. This statement concerns the conversion operation itself and does not make claims about unrelated website analytics, hosting requests, or other site-level services.
Frequently Asked Questions
What does a Base64 encoder do?
A Base64 encoder converts bytes into a text representation using a defined 64-character alphabet. This tool first converts text into UTF-8 bytes, then encodes those bytes as standard Base64.
How do I decode Base64 to text?
Select Decode, paste a standard Base64 string into the input field, and select Decode to text. The decoded bytes must represent valid UTF-8 text for this tool to display them successfully.
Can Base64 encode Persian text and emoji?
Yes. The tool converts text to UTF-8 bytes before encoding it. This supports Persian, other international characters, and emoji.
Is Base64 encryption?
No. Base64 is a reversible encoding, not encryption. It does not require a key and does not prevent other people from reading the original content.
Why does Base64 output sometimes end with equals signs?
Standard Base64 uses padding characters when needed to represent the final group of input bytes. One or two equals signs may appear at the end of the encoded value.
Why does decoding sometimes fail?
The input may contain invalid Base64 characters or padding, may use Base64URL instead of standard Base64, or may decode to bytes that are not valid UTF-8 text.
Does this tool support Base64URL?
No. This version accepts standard Base64. Base64URL uses hyphens and underscores in place of plus signs and slashes and may omit trailing padding.
Are my inputs uploaded to a server?
The conversion code runs locally in your browser and does not require a conversion API. This does not make a blanket claim about analytics or other services used by the website itself.