Skip to content
MyToolers

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to readable text.

About this tool

Convert text to Base64 for data URLs, email headers or API payloads, and decode Base64 strings back into plain text. Full Unicode is supported, so accented letters, Arabic, Urdu and emoji work correctly.

How to use it

  1. Choose Encode or Decode.
  2. Paste your text or Base64 string.
  3. Copy the result. Invalid Base64 shows a clear error.

Good to know

  • Text is converted as UTF-8 before encoding.
  • Base64 is an encoding, not encryption — anyone can decode it.
  • Everything runs in your browser.

What Base64 is for

Base64 turns any data into a set of 64 safe characters (A–Z, a–z, 0–9, + and /) so it can travel through systems that only expect plain text — email attachments, data URLs in web pages, JSON fields and HTTP basic authentication headers.

The encoded text is about a third larger than the original, because every 3 bytes become 4 characters. The = signs at the end are padding.

Example

“Hello” encodes to “SGVsbG8=”. Decoding “SGVsbG8=” gives “Hello” back. Text in Urdu, Arabic or with emoji is converted to UTF-8 first, so it decodes back exactly.

It is not encryption

Anyone can decode Base64 — it hides nothing. Never use it to protect passwords or private data; use proper encryption or hashing for that. If you find a password in Base64 inside a config file, treat it as exposed.

Where you will meet Base64

Images embedded in HTML or CSS as data URLs (data:image/png;base64,…), email attachments, API payloads that must carry files as text, and the HTTP Basic authentication header, which is simply “Basic ” followed by the Base64 of username:password — readable by anyone, so it must only ever travel over HTTPS.

Base64 makes data about a third larger: every 3 bytes become 4 characters. Encoding the word hello gives aGVsbG8=, where the = is padding that rounds the length up to a multiple of four.

Base64 and Base64url

Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant, Base64url, uses - and _ instead and usually drops the = padding. JSON Web Tokens use Base64url — to read one, use our JWT Decoder.

Frequently asked questions

Is Base64 secure?

No. Base64 only changes how data is represented. Do not use it to hide passwords or secrets.

Why is the encoded text longer?

Base64 output is about one third larger than the original because it uses only 64 safe characters.