Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 back to text. Unicode is handled as UTF-8.

Developer ToolsFreeNo sign-up
Runs in your browser. Nothing you enter is uploaded.

01How to use the Base64 Encoder/Decoder

  1. 01Choose Encode or Decode.
  2. 02Paste your text or Base64 string.
  3. 03Copy the result, or swap it into the input to reverse the operation.

02How Base64 works

Text is converted to UTF-8 bytes.
Every 3 bytes (24 bits) become 4 characters of 6 bits each,
from the alphabet A–Z a–z 0–9 + /.
“=” pads the end when the length isn’t a multiple of 3.

URL-safe variant: + → -, / → _, padding removed.

03Examples

“Hi” encodes to “SGk=”.

“SGVsbG8=” decodes to “Hello”.

Base64 output is about 33% larger than the input.

04Frequently asked questions

Is Base64 encryption?

No. Anyone can decode it. It is a way to represent binary data as text, not a way to keep it secret.

When should I use the URL-safe option?

When the result goes in a URL, file name or JSON Web Token, where + and / have special meanings.

Can I decode images?

Not to a picture. This tool decodes to text only and will tell you if the data isn’t valid text.