Developer Tools

Base64 Encode & Decode

Encode text to Base64 or decode it back, with URL-safe output and full Unicode support.

Enter text and press Encode or Decode.

What is Base64 encoding?

Base64 is a way of representing binary data as plain ASCII text, using 64 safe characters (A–Z, a–z, 0–9, +, /). It is used everywhere text-only channels must carry arbitrary data: embedding images in HTML or CSS, HTTP basic authentication, email attachments, data URLs, and tokens like JWTs. Encoding is fully reversible — decoding returns the exact original bytes. This tool encodes and decodes text with correct Unicode handling, plus a URL-safe variant that swaps + and / for - and _ so the output survives in URLs and filenames.

How to use this tool

  1. Type or paste your text into the input box.
  2. Tick URL-safe output if the result will go into a URL, filename, or JWT-style token.
  3. Press Encode to convert text to Base64, or paste Base64 and press Decode to get the original text back.
  4. Use Copy output to copy the result.

Key features

Common use cases

Practical tips

Frequently Asked Questions

Is Base64 encryption?
No. Base64 is a reversible encoding with no key — anyone can decode it instantly. It exists for compatibility with text-only systems, never for secrecy.
What is URL-safe Base64?
Standard Base64 uses + and /, which have special meanings in URLs. URL-safe (base64url) mode replaces them with - and _ and drops the = padding, so tokens work in links and filenames.
Why did my Urdu or emoji text break in another encoder?
Many naive encoders mishandle characters outside ASCII. This tool converts text to UTF-8 first, so any Unicode text encodes and decodes correctly.
Why is the output longer than my input?
Base64 packs 3 input bytes into 4 output characters, so output is roughly 33% larger. That overhead is the price of text-safe transport.
Does decoding validate the input?
Yes — characters outside the Base64 alphabet cause a clear error message instead of silently producing garbage, so you know when pasted text is corrupt.