Base64 Encoder / Decoder
Encode and decode Base64 text with full UTF-8 support.
Text / Base64 Input
Encoded / Decoded Output
What is the Base64 Encoder / Decoder?
The Base64 Encoder / Decoder converts text to Base64 and back, with full UTF-8 support — including emoji and non-Latin scripts that naive implementations mangle. Base64 encodes binary data as a safe subset of ASCII characters, which is why it appears everywhere: HTTP basic auth headers, data URLs, JWT segments, email attachments, and API payloads.
The decoder accepts both standard Base64 (+ and /) and the URL-safe variant (- and _), tolerates missing padding, and reports a clear error when the input isn't valid Base64 or doesn't decode to valid UTF-8 text.
How to use the Base64 Encoder / Decoder
- Type or paste text into the input panel.
- Click Encode to produce Base64, or Decode to convert Base64 back to text.
- Use Swap to move the output into the input for chained conversions.
- Copy the result to your clipboard.
Examples
Encode
Hello, world! → SGVsbG8sIHdvcmxkIQ==
UTF-8 round trip
héllo → aMOpbGxv → héllo
Multi-byte characters survive the round trip because encoding is UTF-8 aware.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption — anyone can decode it. Never use Base64 to protect secrets; it only makes binary data safe to transmit as text.
Why does my Base64 fail to decode?
Common causes are truncated strings, characters outside the Base64 alphabet, or data that decodes to binary rather than UTF-8 text. The error message distinguishes these cases.
Does this support URL-safe Base64?
Yes. The decoder automatically accepts - and _ in place of + and /, and handles missing = padding, so JWT segments decode without preprocessing.
Related developer tools
URL Encoder / Decoder
Percent-encode and decode URLs and query string components.
Security & Encoding
HTML Encoder / Decoder
Convert text to HTML entities and decode entities back to text.
Security & Encoding
JWT Decoder
Decode JWT headers, payloads, and claims — entirely in your browser.
Security & Encoding
Hash Generator
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes with Web Crypto.
Security & Encoding