Base64 Encoder/Decoder
Base64 is an alphabet, not a lock. It turns arbitrary bytes into ASCII so they survive JSON, email MIME, or a URL query. Anyone can decode it in one line. If you need confidentiality, encrypt first, then encode the ciphertext. This page also does URL-safe Base64 (RFC 4648) for tokens.
What the Base64 encoder and decoder is for
Base64 rewrites binary data using only 64 safe ASCII characters, so it can travel through systems that expect text — email bodies, JSON fields, data URLs, HTTP headers, and configuration files.
It appears constantly in day-to-day development: embedded images, JWT segments, Basic Authentication headers, and Kubernetes secrets are all Base64.
Common uses
- Reading a Base64 value from a config file or Kubernetes secret
- Encoding a small image as a data URL
- Decoding the payload segment of a JWT by hand
- Inspecting a Basic Auth header while debugging an API call
What the output means in the real world
Encoded output is safe to paste into a config file or a JWT segment. Decoded output is the original bytes as text; if those bytes were a secret, you just revealed them on screen. Do not email a Base64 private key and call it obfuscated. Rotate any credential that travelled as Base64 through chat.
How this fits into real work
PEM certificates, Docker auths, and Kubernetes secrets are Base64 because YAML and HTTP like ASCII. Cluster 'secrets' that are only Base64 are readable to anyone with get access. That is packaging, not encryption.
Standard Base64 uses plus and slash, which break in URLs. Base64url swaps in hyphen and underscore and often drops padding. JWT header and payload segments are Base64url, not the MIME alphabet.
Support tickets full of 'encrypted' passwords that decode in this box are a training failure. Show staff the decode once so the myth dies.
How to use this tool
- Paste your text or Base64 string into the input box.
- Press Encode to convert text into Base64, or Decode to convert Base64 back into text.
- Switch on URL-safe mode when the value goes into a URL or filename — it swaps + and / for - and _.
- If decoding fails, check for missing = padding or stray line breaks pasted from a terminal.
Tips
- Base64 is not encryption and offers no protection whatsoever — anyone can decode it instantly.
- Encoding inflates size by about a third, which matters for large payloads.
- A Kubernetes secret is only Base64-encoded, not encrypted. Treat those values as plaintext.
Privacy & how it works
Everything happens inside your browser. The values you type are held in page memory only, are never sent to a server, and disappear when you close the tab. You can confirm this in your browser's network tab: the only request a tool makes is one that names the tool for a usage count, with nothing you typed in it. The tools also work with the internet disconnected.
Frequently asked questions
- Is Base64 a form of encryption?
- No. It is an encoding with no key and no secrecy. Anyone can reverse it in a second, so never use it to hide sensitive information.
- What is URL-safe Base64?
- A variant that replaces + with - and / with _, because the standard characters have reserved meanings in URLs. JWTs use this variant.
- Why does my decoded text look like nonsense?
- The input was probably binary rather than text — an image or compressed data will not render as readable characters. It can also mean the string was truncated.
Browse other tools
All tools run entirely in your browser — nothing you type is sent to a server, except the optional HIBP 5-character hash prefix.