Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 back to text as you type. Text is read as UTF-8, so accents and emoji survive the round trip, and URL-safe Base64 decodes too.
Text to encode
Try sample texts:
Operation
Base64 encoded
Base64 encoded text will appear here...
Usage tips
- Encode: Convert text to Base64 format for safe transmission
- Decode: Convert Base64 strings back to readable text. URL-safe Base64 and missing padding work too
- Base64 is commonly used in web development and data storage
- Use the swap button to quickly switch between input and output
- Text is encoded as UTF-8, so accents and emoji round trip correctly
How to encode and decode Base64
- Pick Encode to turn text into Base64, or Decode to turn Base64 back into text.
- Type or paste into the box. The result shows on the right as you type. Spaces and line breaks inside Base64 are ignored when decoding.
- If decoding fails, the message says why: a character that does not belong, the wrong length or padding, or data that is not readable text.
- Copy or download the result, or click Swap input and output to run it back the other way. For text that goes inside a link, use URL Encoder/Decoder instead.
Frequently asked questions
What is Base64 encoding?
Base64 writes any data with just 64 safe characters: A-Z, a-z, 0-9, + and /, with = as padding at the end. Every 3 bytes become 4 characters. It lets binary data or special characters travel where only plain text fits, such as email attachments, data URLs and JSON fields.
Sources: IETF, RFC 4648: Base16, Base32 and Base64 encodings
Is Base64 encryption?
No. Base64 has no key, and anyone can decode it in one step, on this page or anywhere else. Never use it to hide a password or a secret.
Why is Base64 longer than the original?
Because every 3 bytes turn into 4 characters, the result is about 33% longer. Hello World! is 12 bytes and encodes to 16 characters: SGVsbG8gV29ybGQh.
Sources: IETF, RFC 4648: Base16, Base32 and Base64 encodings
What is URL-safe Base64?
It is the same encoding with - in place of + and _ in place of /, so the text can sit in a link or file name. RFC 4648 calls it base64url, and JSON Web Tokens use it with the = padding left off. This tool decodes both forms and adds missing padding back; when encoding, it writes standard Base64.
Sources: IETF, RFC 4648: Base16, Base32 and Base64 encodings
Why does decoding say the data is binary, not readable text?
The Base64 is valid, but what it holds is not UTF-8 text. It may be an image, a PDF or compressed data. This tool works with text only, so it cannot show or save that file.
Does it handle Urdu, accents and emoji?
Yes. Text is turned into UTF-8 bytes before encoding, so اردو, café and emoji decode back exactly. JavaScript's built-in btoa function fails on these characters, which is why some quick scripts break on them.
Is my text sent anywhere?
No. Encoding and decoding run in your browser, and nothing is uploaded or saved.