Skip to main content
Tools Harbor

Base64 Encoder / Decoder

Encode text or files to Base64, or decode a Base64 string back to plain text.

Direction

A reliable Base64 encoder for text

Base64 is one of the most common encodings on the web. The Base64 Encoder and Decoder translates between plain text and Base64 with full UTF-8 support, so emojis, accented characters, and non-Latin scripts all round-trip correctly.

When Base64 appears in real systems

  • Data URLsdata:image/png;base64,iVBOR... inlines an image directly inside HTML or CSS.
  • JWT tokens — each of the three segments is a Base64URL-encoded JSON object.
  • Basic authentication — HTTP’s Authorization: Basic <base64> is just user:password encoded.
  • Email attachments — MIME uses Base64 to carry binary files in text email bodies.
  • Small binaries in config — keys, certificates and icons sometimes appear as Base64 blobs in YAML / JSON configs.

What this tool does

  • Encode converts any UTF-8 text into the standard Base64 alphabet, including = padding.
  • Decode accepts standard Base64 (with or without padding) and returns UTF-8 text.

Privacy

The entire conversion happens in your browser. If you paste a token, password or key here, it does not leave your device.

Frequently asked questions

What is Base64 used for?
Base64 encodes binary data using only 64 printable ASCII characters (A-Z, a-z, 0-9, + and /). It is widely used to embed binary payloads inside text-only contexts — data URLs, JSON, email (MIME), JWTs, and HTTP Basic Auth.
Does Base64 encryption secure my data?
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string back to the original — there is no key. Do not use it to protect secrets.
Why does my decoded string have strange characters?
Most commonly, the input was not valid Base64 (perhaps truncated or missing padding), or the original bytes were not UTF-8 text. The decoder attempts UTF-8 decoding, which is the dominant text encoding on the web.