Skip to content

Base64 encoder and decoder

Free, no sign-up Runs in your browser

Encode text to Base64 or decode Base64 back to text, in the standard or the URL-safe alphabet. UTF-8 aware, and it runs in your browser.

Direction
Alphabet

URL-safe uses - and _ instead of + and /, with no padding. JWTs use it.

Base64
The result appears here.

Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.

How to use the base64 encoder and decoder

  1. Choose the direction: text to Base64, or Base64 to text.
  2. When encoding, choose the standard or the URL-safe alphabet.
  3. Type or paste the input. The result updates as you type.
  4. Copy the result with the button above it.

About this tool

Base64 writes any bytes using 64 printable characters, so binary data can travel through places that only carry text: an HTTP header, a JSON field, an environment variable, a Kubernetes Secret. It makes data about a third longer and hides nothing.

That last point is the one that matters for security. Base64 is an encoding, not encryption: anyone can reverse it. A password in a Basic auth header or a value in a Kubernetes Secret manifest is only encoded, so treat the encoded form as the secret itself.

The URL-safe alphabet replaces + and / with - and _ and usually drops the = padding, which is what JSON Web Tokens use. This tool decodes both alphabets and tells you when the result is not text.

Sources

Questions

Is Base64 encryption?

No. Base64 is a reversible encoding with no key. Anyone who sees the encoded text can decode it, so it gives no confidentiality at all.

What is the difference between Base64 and Base64URL?

Base64URL uses - and _ in place of + and /, and normally leaves off the = padding, so the result is safe inside a URL or a file name. JWTs use Base64URL.

Why does decoding say the result is not text?

The Base64 was valid but the bytes it holds are not UTF-8 text. That is normal for images, keys, compressed data and other binary content.

Are Kubernetes Secrets encrypted with Base64?

No. The values in a Secret manifest are Base64-encoded only. Anyone who can read the manifest can read the secret, which is why manifests with Secrets do not belong in a repository.

Related tools