Home › Developer Tools › Base64 Encoder / Decoder

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to readable text — Unicode-safe and instant.

What is this tool?

Base64 turns binary data and text into a safe string of letters, numbers, plus and slash characters, so it can travel through systems designed for plain text: email, URLs, JSON payloads, data URIs and basic-auth headers. Developers reach for a Base64 tool when debugging API tokens, embedding small images in CSS, or checking what an encoded value actually says.

This encoder and decoder handle full Unicode text correctly, so accented characters and emoji survive the round trip — something naive encoders get wrong. Remember that Base64 is an encoding, not encryption: anyone can decode it, so never treat a Base64 string as a way to hide passwords or secrets.

How to use it

  1. Paste plain text (for encoding) or a Base64 string (for decoding) into the input box.
  2. Click Encode to Base64 or Decode from Base64.
  3. Copy the result from the output box.

Formula & method

Base64 processes the input three bytes at a time, splitting each 24-bit group into four 6-bit values that map to the characters A–Z, a–z, 0–9, + and /, with '=' padding at the end when the input length is not a multiple of three. Encoding grows data by about 33 percent.

Worked example

The text 'Hello, USA!' encodes to 'SGVsbG8sIFVTQSE='. API developers see the same scheme in a Basic authorization header, where 'username:password' is Base64-encoded before being sent.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 is a public, reversible encoding with no key. It protects data from corruption in transit, not from being read — anyone can decode it instantly, including with this tool.

Why does my decoded text look garbled?

The input may not be Base64 at all, may be truncated, or may be another encoding such as a JWT segment or hex. Check for characters outside the Base64 alphabet and missing '=' padding.

What is URL-safe Base64?

A variant that replaces '+' with '-' and '/' with '_' so the string can sit in a URL without escaping. It is used in JSON Web Tokens and many share links.

Related tools