Base64 Encoder Decoder
Encode and decode Base64 — with Unicode handled correctly, in your browser.
What this tool does
Base64 represents arbitrary bytes using 64 printable characters, so binary data can travel through channels that only reliably carry text: email bodies, JSON strings, data URIs, HTTP headers and configuration files.
It is an encoding, not encryption. Base64 provides no confidentiality whatsoever — anyone can decode it in seconds, as this page demonstrates. Its purpose is safe transport, and treating it as a security measure is a common and serious mistake.
The Unicode handling is the part naive implementations get wrong. The browser's built-in btoa only accepts characters below U+0100, so anything with an accent, a CJK character or an emoji throws an error. This tool converts to UTF-8 bytes first, so text in any language round-trips correctly.
How to use it
- Paste your text or Base64. Direction defaults to Detect: input that parses as Base64 is decoded, anything else is encoded. Force it with the Encode or Decode setting when the guess goes the wrong way.
- Choose the alphabet and wrapping. Encoding offers the standard alphabet with + / and = padding, or the URL-safe alphabet using - and _ with padding dropped. Output can stay on one line or wrap every 64 or 76 characters for MIME.
- Read the result. Decoded output is shown as UTF-8 text, or as hex bytes if you switch Decoded output to Hex — useful when the payload is not text at all.
- Copy it. Take the result straight to the clipboard.
Processing & privacy
Runs on your device. Your file is processed directly in this browser.
Common use cases
Reading a Basic Auth header
Decode the credentials portion to check which username a client is actually sending.
Building a data URI
Encode a small asset so it can be inlined into CSS or HTML without a separate request.
Inspecting a config value
Kubernetes secrets and many CI systems store values Base64-encoded; decoding shows what is really set.
Debugging an API
Confirm that an encoded field decodes to what you expect, particularly with non-English text.
Questions
Is Base64 secure?
Is my input sent anywhere?
Why does my emoji or accented text fail elsewhere but work here?
What are the trailing = characters?
What about URL-safe Base64?
Can I encode a file?
Why did my plain text get decoded instead of encoded?
Related tools
- JSON Formatter — Pretty-print, collapse and inspect JSON instantly.
- JWT Decoder — Inspect the header, payload and claims of a JWT.
- Hash Generator — Compute MD5, SHA-1, SHA-256 and SHA-512 digests.
- Regex Tester — Test patterns against sample text with live matches.
- Unix Timestamp Converter — Convert between epoch seconds and readable dates.
- QR Code Generator — Create a QR code for a link, text, Wi-Fi or vCard.