Base64 Encoder & Decoder
Encode plain text to Base64 or decode Base64 back to text. Unicode, Swedish characters and emoji are handled as UTF-8.
How to use
- Paste the text you want to encode, or the Base64 you want to decode.
- Choose Encode or Decode.
- Copy the result. Invalid Base64 shows an error instead of a garbled string.
How it works
Base64 turns binary data into ASCII using 64 characters (A–Z, a–z, 0–9, + and /) plus = padding. It is encoding, not encryption: anyone can decode the result.
Browsers expose btoa and atob, but those work on binary strings, not JavaScript UTF-16 text. This page first encodes your text as UTF-8 bytes with TextEncoder, then Base64-encodes those bytes. Decoding reverses the steps.
Invalid Base64 is rejected with an error instead of a corrupted string. Nothing is uploaded.
Formula
encode: UTF-8 bytes → Base64 decode: Base64 → UTF-8 bytes → text Alphabet = A–Z a–z 0–9 + / with = padding
Worked examples
ASCII
Hello → SGVsbG8=
Swedish and emoji
Göteborg 👋 → R8O2dGVib3JnIPCfpYg=
Useful notes
- Whitespace in Base64 input is ignored.
- This is encoding, not encryption. Anyone can decode the result. Do not use it to hide secrets.
- The text stays in your browser and is not sent to analytics.
FAQ
- Is Base64 encryption?
No. It is a reversible encoding. Anyone who sees the Base64 can decode it. Do not use it to hide secrets.
- How do I encode text as Base64?
Paste the text and choose Encode. The page converts to UTF-8 first, so å, ä, ö and emoji survive.
- How do I decode Base64?
Paste the Base64 and choose Decode. Invalid input shows an error instead of a half-decoded string.
- Does this handle Unicode?
Yes. Text is converted through UTF-8, so å, ä, ö and emoji survive a round trip.
- Is my text uploaded?
No. Encoding and decoding run in your browser and are not sent to analytics.
Guides
What Is Base64?
Base64 is a way to write binary data using 64 ASCII characters. It is encoding, not encryption. Anyone who sees the string can decode it.
How to Encode Base64
Convert text to UTF-8 bytes, then to Base64. The result is longer ASCII, not a secret. Unicode and emoji need the UTF-8 step or they will be corrupted.
How to Decode Base64
Decoding reverses Base64 back to bytes, then to text with UTF-8. Invalid characters should fail loudly. Success does not mean the original message was secret.
Related tools
URL Encoder / Decoder
Percent-encode or decode URL components in your browser with encodeURIComponent and decodeURIComponent.
JSON Formatter
Pretty-print, minify or validate JSON in your browser. Parse errors show an approximate line and column.
Hash Generator
Hash text with SHA-256, SHA-384 or SHA-512 in your browser. Output is lowercase hex. Hashing is not encryption.
See all Utilities tools.