MUTools

Encoding

Base64 Encode / Decode

Base64 Encode / Decode converts text into a Base64 string and back again. Results update the moment you type or paste — there is no separate "convert" button to press.

Conversion mode
Base64 output
Results will appear here as you type.

Everything is processed entirely in your browser and is never sent to a server.

About Base64 Encode / Decode

Base64 Encode / Decode converts text into a Base64 string and back again. Results update the moment you type or paste — there is no separate "convert" button to press.

In the encode direction, your text is encoded as UTF-8 and then converted to Base64. Multibyte content — Japanese, Chinese, emojis, special symbols — is handled correctly without any extra setup. In the decode direction, a Base64 string is parsed and interpreted as UTF-8 to recover the original text. If the input is not valid Base64, or if the decoded bytes are not valid UTF-8, a clear error message is shown in the output area.

Two options are available: "URL-safe Base64" and "Wrap at 76 chars". URL-safe Base64 is the variant used in URLs, file names, and JWT headers / payloads — it swaps "+" / "/" for "-" / "_" and drops the trailing "=" padding. The 76-character wrap matches MIME (email bodies, PEM-encoded certificates, etc.).

Everything you enter is processed entirely in your browser; nothing is sent to a server. That makes the tool safe for tokens, secrets, or anything containing personal information. Runs entirely in your browser.

How to use

  1. Pick a direction at the top — "Text → Base64" or "Base64 → Text".
  2. Type or paste your input. The output panel updates in real time.
  3. Toggle "URL-safe Base64" or "Wrap at 76 chars" if you need the matching variant.
  4. Use the "Copy" button at the top of the output panel to copy the result to the clipboard.
  5. To try a different input, hit "Clear" and paste again.

Use cases

  • Verifying email attachments or other SMTP-style protocols that embed binary as text.
  • Expanding "data:image/png;base64,..." data URIs to inspect the embedded image or PDF.
  • Decoding URL-safe Base64 JWT headers / payloads back into readable JSON during debugging.
  • Spot-checking sample tokens or ciphertext from API documentation while wiring up a client.
  • Decoding long, line-wrapped Base64 strings copy-pasted from email or PEM files — whitespace is stripped automatically.

Notes

  • Text is encoded as UTF-8 before being converted to Base64. Japanese, Chinese, emojis, and other multibyte content all round-trip correctly.
  • On decode, every whitespace character in the input (half-width space, tab, newline, etc.) is stripped automatically. Multi-line Base64 strings can be pasted as-is.
  • Trailing "=" padding is reconstructed automatically when decoding, so URL-safe Base64 strings without padding also work without manual fixes.
  • With "URL-safe Base64" on, the encoded output drops "+", "/", and "=" so it can be embedded directly into URLs, file names, or JWTs. Decoding reverses the substitution automatically.
  • "Wrap at 76 chars" only applies to standard (non-URL-safe) encoded output. Use it when you need MIME / PEM-style line breaks.
  • When the input contains invalid characters, has invalid length, or does not decode to valid UTF-8, the output area shows the matching error message.

FAQ

Is my text or Base64 string sent to a server?
No. All conversion happens locally in your browser. Access tokens, secrets, and personal information are safe to paste here.
What is URL-safe Base64?
A Base64 variant designed to be embedded directly in URLs and file names. It substitutes "+" / "/" with "-" / "_" and drops the trailing "=" padding. JWT headers / payloads and many Google APIs use it.
Does it handle Japanese, Chinese, and emojis correctly?
Yes. Text is encoded as UTF-8 before Base64 conversion, so multibyte characters round-trip cleanly.
Can it handle very long input?
Inputs of a few megabytes work without issues. Because everything runs in the browser, very large inputs can take a moment depending on your device.
Can I paste Base64 with line breaks?
Yes. On decode, every whitespace character (space, tab, newline) is removed before processing, so multi-line Base64 from emails or PEM blocks works without manual cleanup.