Base64 Encoder & Decoder
Encode text to Base64, or decode Base64 back to readable text — instantly in your browser. Paste your text, click Encode or Decode, and copy the result. Works with Urdu, Arabic, emoji and every other character, free with no sign-up.
About This Base64 Encoder & Decoder
Base64 looks like gibberish — long strings of letters, digits, + and / signs — but it is one of the hardest-working formats on the internet. It turns any data into text that is safe to send through systems that only understand text: email attachments, images embedded in web pages, API tokens, and configuration files all travel as Base64. This free tool converts in both directions: paste ordinary text and click Encode to Base64, or paste a Base64 string and click Decode from Base64 to read what it says.
Unlike many simple converters, this one handles the full Unicode range. Your text is converted to UTF-8 bytes first, so Urdu, Arabic, Chinese and emoji encode and decode correctly instead of breaking. Everything runs in your browser — nothing is uploaded, stored or logged.
How to Use It
- Paste or type your text into the input box.
- Click Encode to Base64 to turn text into Base64, or Decode from Base64 to turn Base64 back into text.
- Read the result in the output box and check the character counts.
- Click Copy Output to copy the result, or Swap to feed the output back in for the opposite conversion.
Base64 Examples
Try these in the tool above — encode the text on the left, or decode the Base64 on the right:
| Text | Base64 |
|---|---|
| Hello | SGVsbG8= |
| Hello, World! | SGVsbG8sIFdvcmxkIQ== |
| Ali Super Tools | QWxpIFN1cGVyIFRvb2xz |
| foobar | Zm9vYmFy |
How Base64 Works
Base64 reads your data three bytes at a time and writes each group of three bytes as four characters chosen from a 64-character alphabet: A–Z, a–z, 0–9, + and /. That is why the output is always about a third longer than the input, and why it often ends with one or two = signs — the padding that fills the last group when the data does not divide evenly by three. The classic test words show the pattern: f encodes to Zg==, fo to Zm8=, foo to Zm9v, and foobar to Zm9vYmFy.
One important warning: Base64 is an encoding, not encryption. It makes data safe to transport, not secret — anyone with a decoder like this one can read it. Never use Base64 to hide a password or private information.
When You Will Meet Base64
- Email attachments. Email was built for text, so attachments are Base64-encoded for the journey and decoded by your mail app.
- Images in web pages. Small icons and logos are often embedded directly in CSS or HTML as Base64 data URLs, saving a separate file download.
- API keys and tokens. Many services hand out credentials and signed tokens in Base64 (often the URL-safe variant with - and _ , which this decoder also accepts).
- Debugging. When an app shows you a Base64 blob in a log or an error message, decoding it here tells you what it actually contains.
Who Is This Tool For?
- Developers — encode test payloads, decode tokens and data URLs, and check what an API is really sending.
- Students — see how encoding works with instant examples, including the classic f / fo / foo / foobar test vectors.
- Support and QA teams — read the Base64 strings that turn up in tickets, logs and error reports.
- Curious readers — decode the mysterious strings in email headers, web pages and app data to see what they say.
Frequently Asked Questions
Base64 is a way of writing any data — text, images, files — using only 64 safe characters: the letters A–Z and a–z, the digits 0–9, plus + and /. It is used wherever binary data has to travel through a text-only channel, such as email attachments, data URLs in web pages, and API tokens. It is an encoding, not encryption: anyone can decode it, so never treat Base64 as a way to hide a password.
Paste or type your text into the input box and click Encode to Base64. The encoded result appears in the output box — for example, Hello becomes SGVsbG8=. Click Copy Output to take it with you, or Swap to move the output back into the input box and decode it again.
Paste the Base64 string into the input box and click Decode from Base64. Line breaks and spaces in the pasted string are ignored, missing = padding at the end is repaired automatically, and URL-safe Base64 (with - and _ instead of + and /) is accepted too. If the input is not valid Base64, the tool tells you instead of showing gibberish.
Yes. The text is converted to UTF-8 bytes before encoding, so Urdu, Arabic, Chinese, emoji and every other Unicode character encode and decode correctly. For example, the Urdu word for peace encodes to 2LPZhNin2YU= and decodes straight back. Many simple Base64 tools fail on such text; this one does not.
Base64 writes every 3 bytes of data as 4 characters, so the encoded text is about one third longer than the original. Hello, World! is 13 characters; its Base64 form, SGVsbG8sIFdvcmxkIQ==, is 20 characters. That size increase is the price of making the data safe for text-only channels.
No. Encoding and decoding happen locally in your browser and nothing is uploaded, stored or logged — which also means it is safe to use with text you would not paste into an unknown website.