$ SudoStuff

Base64 Encoder / Decoder

Encode and decode Base64 without mangling Unicode.

Direction

Processed locally in your browser. Nothing you type here is sent to our servers.

What is Base64?

Base64 encodes arbitrary bytes using only 64 printable ASCII characters. It exists because plenty of systems — email headers, JSON string fields, URLs, HTTP basic auth — can carry text safely but mangle raw binary. The cost is size: Base64 output is about a third larger than its input.

It is worth being clear about what Base64 is not: it is not encryption. Anyone can decode it instantly, as this page demonstrates. It is an encoding for safe transport, nothing more.

How to use it

  1. Choose Encode or Decode.
  2. Type or paste into the input — the result updates as you type.
  3. Use Use output as input to flip direction and verify a round trip.
  4. Copy the result, or download it as a text file.

Unicode is handled correctly

A browser's built-in btoa() throws on any character above U+00FF, which is why so many home-made implementations corrupt accents and emoji. This tool converts your text to UTF-8 bytes first and decodes back the same way, so café, 日本語 and 🎉 all survive the round trip intact — matching what Base64 means in every other language.

Standard and URL-safe alphabets

Standard Base64 uses + and / as its last two characters, both of which have meaning inside a URL. The URL-safe variant (RFC 4648 §5) substitutes - and _, which is what JWTs and most token formats use.

Decoding accepts either alphabet automatically, along with missing padding, embedded newlines and a pasted data: URL prefix — so you rarely need to clean up input by hand.

Common use cases

  • Reading a Base64 field inside an API response or a log line.
  • Building an HTTP Basic Authorization header.
  • Embedding a small asset as a data: URI.
  • Encoding a value so it survives a system that mangles special characters.
  • Decoding a Kubernetes Secret, whose values are always Base64.

Limitations

  • This tool works with text. Decoding Base64 that contains binary data — an image, a compressed archive — reports that the bytes are not valid UTF-8 rather than showing you mojibake.
  • Base64 provides no confidentiality and no integrity. Do not use it to hide anything.
  • Very large inputs are limited by your device's memory, since everything is processed in the browser.
↑↓ navigate ↵ open esc close