How to encode or decode Base64
- Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
- Type or paste into the input box. The result updates as you type.
- For values going into URLs, file names or JWTs, turn on URL-safe.
- Copy the result, download it, or press Swap to reverse the direction.
Standard vs URL-safe Base64
| Variant | Characters 62 and 63 | Padding | Used in |
|---|---|---|---|
| Standard (RFC 4648 §4) | + and / | = to a multiple of 4 | Email attachments, data URLs, most APIs |
| URL-safe (RFC 4648 §5) | - and _ | Usually omitted | JWTs, URLs, file names |
Base64 isn't encryption
Base64 only changes how data is written down; anyone can decode it in a second. Use it to move data safely through text-only channels, never to hide passwords, keys or personal information.
Common uses
- Reading an encoded config value. Kubernetes secrets and some config files store values in Base64. Decode one to check what it says, or encode a new value to paste in.
- Building a Basic auth header. HTTP Basic authentication sends username:password in Base64. Encode the pair to build an Authorization header when testing an API.
- A value hidden in a link or token. Decode a Base64 parameter from a URL or a segment of a token to read the text inside. Standard and URL-safe input both work.