Base64 Encoder & Decoder
Encode and decode Base64 strings instantly — with full Unicode support.
How to Use
- 1Enter your text
Type or paste the text you want to encode, or a Base64 string you want to decode.
- 2Choose mode
Select Encode to convert text to Base64, or Decode to convert Base64 back to text.
- 3Get instant results
The output updates in real time as you type. Unicode text is fully supported.
- 4Copy the result
Click Copy Output to grab the encoded or decoded text for use in your project.
Common Use Cases
Data URIs
Embed small images, fonts, or files directly in HTML and CSS using Base64-encoded data URIs.
Basic Authentication
Encode username:password pairs for HTTP Basic Auth headers used in API requests.
Binary Data in JSON
Safely transmit binary data through JSON APIs by encoding it as a Base64 string.
JWT & Tokens
Decode JWT tokens and API keys to inspect their payload without external tools.
Frequently Asked Questions
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. It uses 64 characters (A-Z, a-z, 0-9, +, /) to encode data, making it safe for text-based protocols.
Does it support Unicode and emoji?
Yes. The tool uses TextEncoder/TextDecoder to handle full Unicode text including emoji, CJK characters, and other non-ASCII content — unlike plain btoa() which only works with Latin-1.
Is there a size limit?
No hard limit. Everything runs in your browser, so very large inputs may slow things down, but there is no server-side restriction.
Is my data safe?
Yes. All encoding and decoding happens locally in your browser. No data is sent to any server.
Why is Base64 output ~33% larger than the input?
Base64 encodes every 3 bytes of input into 4 ASCII characters. This 4:3 ratio means the encoded output is always about 33% larger than the original binary data.
Can I decode any Base64 string?
The tool decodes standard Base64 strings. If the input contains invalid characters or incorrect padding, an error message will be shown.