Base64 Encoder / Decoder
Convert text to Base64 and back. Text is encoded as UTF-8 first, so accents, emoji and non-Latin scripts round-trip correctly. You can also encode a file into a Base64 string or data URL.
Base64
Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect secrets.
How to encode or decode Base64
- Choose Encode or Decode.
- Paste text (or Base64) into the input, or pick a file to encode.
- Turn on URL-safe mode for Base64URL used in JWTs and URLs.
- Copy the result, or use Swap to reverse the operation.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding that anyone can reverse. Never use it to hide passwords or secrets.
What is Base64URL?
A variant that uses - and _ instead of + and / and usually omits = padding, so the result is safe in URLs and file names. JWTs use it.
Why does decoding fail?
The input may contain characters outside the Base64 alphabet, have an impossible length, or decode to bytes that are not valid UTF-8 text (for example an image). The error message says which.
Related tools
- URL Encoder / DecoderPercent-encode and decode URLs and query values.
- JWT DecoderInspect a JSON Web Token's header, payload and expiry.
- Hash GeneratorSHA-256, SHA-384 and SHA-512 hashes of text or files.
More in Encoding & Security.