Developer Tools

Base64 Encode / Decode

Encode text to Base64 and decode back — Unicode and emoji safe.

Tool

About the Base64 Encoder / Decoder

The Base64 Encoder / Decoder runs entirely in your browser — your code and data never leave your machine. Paste, click, copy the result.

Base64 converts binary-safe data into 64 printable characters — the standard for embedding images in CSS, sending attachments in JSON, or storing binary blobs in text-only systems. This tool encodes and decodes with full Unicode support, so emoji, Arabic and emoji survive the round trip intact.

How to use this tool

  1. Paste plain text (or paste Base64 and click Swap direction).
  2. Press Encode → or use the swap button to decode.
  3. Copy the output. Input is never uploaded.

How it works

Every 3 bytes of input become 4 Base64 characters. The alphabet is A–Z a–z 0–9 + / with = padding at the end. Because it uses only text characters, Base64 data can travel anywhere plain text can — emails, URLs, JSON — at the cost of ~33% size increase.

When you need it

  • Data URIs: data:image/png;base64,iVBOR…
  • JWT tokens: header and payload are Base64URL
  • HTTP Basic auth: Authorization: Basic base64(user:pass)
  • Embedding binary in JSON or config files

Not encryption: Base64 is encoding, not security. Anyone can reverse it in one line of code — never use it to "hide" passwords or keys.

Who is this tool for?

Front-end developers inlining assets, backend engineers serializing binary data, and anyone who has met data:image/… in the wild.

Developer tip

Base64URL (used in JWTs and URLs) replaces + with - and / with _ and strips =. If a URL-encoded token fails to decode, replace those characters first.

Frequently asked questions

The input was probably URL-safe Base64 (- and _ instead of + and /), or it was encoded as bytes with a different charset. This tool assumes standard UTF-8 Base64.
No — it is trivially reversible. Hash passwords with bcrypt/argon2 server-side instead.
Padding keeps the length a multiple of 4. It can be safely stripped in most modern parsers.

Related tools

Guides for this tool