Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 to text instantly, with full UTF-8 and URL-safe Base64URL support. Runs privately in your browser.
Runs in your browser. Nothing is uploaded.
About the Base64 Encoder/Decoder
Base64 turns any data into plain text made of 64 safe characters (A–Z, a–z, 0–9, + and /). It's how binary data travels through systems built for text: email attachments, data: URLs in HTML and CSS, HTTP Basic authentication headers, JSON Web Tokens and many APIs.
This tool encodes text to Base64 and decodes it back, as you type. Text is handled as UTF-8, so accented letters, non-Latin scripts and emoji work correctly. Many simple encoders break on them.
Base64 is an encoding, not encryption: anyone can decode it. Because you might be decoding credentials or tokens, everything happens in your browser and nothing is sent anywhere.
How to use it
- Choose Encode or Decode.
- Type or paste your text (or Base64) into the input box. The result updates instantly.
- For use in URLs or file names, tick “URL-safe” to use - and _ instead of + and / and drop the = padding.
- Copy the result, or press “Use as input” to reverse it.
Examples
Simple text
“Hello” encodes to SGVsbG8=. The trailing = is padding that makes the length a multiple of 4.
Basic auth header
user:pass encodes to dXNlcjpwYXNz, which is sent as “Authorization: Basic dXNlcjpwYXNz”.
Non-English text
“héllo 👋” encodes to aMOpbGxvIPCfkYs=. The accent and emoji become multi-byte UTF-8 before encoding.
URL-safe variant
Base64URL replaces + with - and / with _, and usually omits padding. It's the format used inside JWTs.
Limitations
- This tool works with text. Decoding Base64 that represents a file (an image, PDF or zip) is detected and reported, but not saved as a file.
- Base64 makes data about 33% larger. It's for compatibility, not compression.
- Base64 provides no security. Never use it to hide passwords or secrets.
Frequently asked questions
Is Base64 encryption?
No. Base64 is a reversible encoding with no key, so anyone can decode it instantly. Use real encryption (such as AES) to protect data.
Why does my Base64 end with = or ==?
Base64 encodes 3 bytes into 4 characters. When the input length isn't a multiple of 3, = signs pad the output to a multiple of 4.
What's the difference between Base64 and Base64URL?
Base64URL swaps the two characters that have special meaning in URLs, + becoming - and / becoming _, and usually drops the padding. This decoder accepts both automatically.
Why do I get “aren't readable text” when decoding?
The Base64 decodes to binary data, such as an image or a compressed file, rather than UTF-8 text, so there's no text to show.
Is my data sent to a server?
No. Encoding and decoding run in your browser using built-in JavaScript functions. Your data never leaves your device.
Related tools
URL Encoder/Decoder
Percent-encode or decode text for safe use in URLs.
JWT Decoder
Decode JSON Web Tokens to inspect the header, payload and expiry.
JSON Formatter
Format, validate and minify JSON with clear error messages.
UUID Generator
Generate random v4 or time-ordered v7 UUIDs, one or many at a time.