Base64 Encoder/Decoder

Convert base64.

Loading tool…

What is Base64?

Base64 is a binary-to-text encoding that represents arbitrary bytes using 64 safe printable characters: A–Z, a–z, 0–9, plus and slash, with equals signs padding the end. It exists because many systems — email headers, URLs, XML and JSON documents, HTTP basic authentication — were designed for text and mangle raw binary data.

The critical thing to understand is that Base64 is not encryption. It provides no secrecy whatsoever; anyone can decode it in a second, which is exactly what this tool does. It is an encoding for safe transport, nothing more. Anything genuinely confidential must be encrypted, and a Base64 string in a config file marked as a secret is not protected in any meaningful sense. The encoding also inflates data by about a third, since every three bytes become four characters.

Why we built this tool

Developers meet Base64 constantly: decoding an HTTP Authorization header, reading a JWT segment, embedding a small asset in a stylesheet, inspecting an encoded payload in a log, or encoding credentials for a client that expects them that way.

Those strings very often contain live credentials — that is the whole point of decoding an Authorization header. Pasting them into a website transmits a working secret to a third party. Ours encodes and decodes in your browser with the native btoa and atob functions, so the string never leaves the tab and no request is made. Even so, rotate any credential you have pasted anywhere, on principle.

Tips and common mistakes

  • Base64 is encoding, not encryption — it offers no confidentiality whatsoever.
  • Base64URL replaces plus and slash with hyphen and underscore; a standard decoder may reject it.
  • Line-wrapped payloads from email headers need the breaks removed before decoding.
  • Rotate any credential you have decoded, on principle.

Open Base64 Encoder/Decoder with a link

Assistants and scripts can open Base64 Encoder/Decoder with its input already in the link, after the #, which never leaves your device:

  • #text= — the text to work on

Example: https://mygadgets.ink/tools/base64-encoder-decoder/#text=... · also compressed gz fields and ?url=. How tool links work

Quick start: using Base64 Encoder/Decoder

  1. Paste your text or Base64 string into the input above.
  2. Choose whether to encode or decode.
  3. Read the result and check it looks like what you expected.
  4. If decoding fails, the string is probably truncated or line-wrapped.
  5. Copy the output — and remember the encoding provides no confidentiality.

For images specifically, see Image to Base64; for tokens, JWT Decoder parses the whole structure.

What Base64 is

Base64 is an encoding — a reversible way of representing binary data using 64 printable characters (A–Z, a–z, 0–9, plus two symbols). It takes arbitrary bytes and makes them safe to put anywhere text is allowed. That is its entire purpose: moving binary through systems built for text.

Why Base64 exists

Some channels only reliably handle plain text. Email was designed for text; certain config formats and URLs choke on raw binary or special characters. Base64 solves this by re-expressing binary data in a limited, universally safe character set, so an image, a file, or binary credentials can ride through unharmed. On the other side, decoding restores the original bytes exactly — it is lossless.

The misconception that matters: encoding is not encryption

This is the single most important thing to understand, and it catches people constantly. Base64 provides zero security. Anyone can decode a Base64 string instantly — it is not a password, not a cipher, not protection of any kind. The consequences:

  • Never treat Base64 as hiding anything. A "Base64-encoded password" in a config is effectively plain text to anyone who sees it.
  • A JWT's readable parts are Base64, not encrypted — which is why you should never put secrets in a token payload. See JWT Decoder.
  • Use real encryption for real secrecy. To actually protect data, encrypt it — for example with Encrypt File — not encode it.

Base64 makes data portable, never private.

Common uses

  • Decode a Base64 blob from a config, header, or API response.
  • Encode data to embed in a URL or JSON.
  • Inspect a token's encoded segments.
  • Move binary through a text-only channel.

Related Text Tools

Browse all Text Tools →