Base64 Encode / Decode

Encode or decode Base64 (UTF-8 safe) with a URL-safe alphabet, optional padding, 64/76 line wrapping, live byte and character counts, and a hex/binary byte view.

Loading tool…

Base64 Encode / DecodeConvert text to Base64 and back, fully UTF-8 safe so emoji and non-Latin scripts round-trip correctly. Switch to the URL-safe alphabet (- and _), drop the = padding, wrap the output at 64 or 76 characters, and inspect the raw bytes as hex or binary alongside live byte and character counts. Everything runs in your browser, so the data you paste never leaves your device.

What is Base64 Encode / Decode?

A free online Base64 encoder and decoder that converts plain text to Base64 or decodes a Base64 string back to readable text, fully UTF-8 safe. Beyond the standard alphabet it offers a URL-safe variant (- and _ instead of + and /), an option to omit the = padding, and MIME/PEM line wrapping at 76 or 64 characters. It shows live byte and character counts and lets you inspect the underlying bytes as hexadecimal or binary. Decoding is tolerant: it accepts standard or URL-safe input, with or without padding or line breaks. Developers use it for data URIs, JWTs, HTTP basic auth headers and config files without writing code.

How to use Base64 Encode / Decode

  1. Choose Encode or Decode with the mode toggle.
  2. Type or paste your content into the input box — plain text to encode, or a Base64 string to decode.
  3. Read the converted result instantly in the output box; it updates as you type.
  4. Open Options (gear icon) to switch between the Standard and URL-safe alphabet, omit the = padding, or wrap the encoded output at 64 or 76 characters.
  5. Check the live byte and character counts, and use the byte view to see the raw bytes as hex or binary (switch the format in Options).
  6. Click copy to copy the result, Swap to convert in the other direction, or Clear to start over.

Examples

Encode plain text

Input

Hello

Output

SGVsbG8=

URL-safe alphabet

Input

>>>

Output

Pj4-

Byte view in hex

Encoding "Hi" shows the raw source bytes 48 69 in the byte view; decoding shows the decoded bytes instead. Switch between hex and binary in Options.

Frequently asked questions

Does it handle emoji and non-Latin characters like Korean or Japanese?
Yes. Encoding and decoding are UTF-8 safe, so emoji and non-Latin scripts round-trip back to the exact original text.
What is the URL-safe Base64 option?
URL-safe Base64 uses - and _ instead of + and /, so the output can go straight into URLs, filenames or JWTs without escaping. You can also omit the trailing = padding. Decoding accepts both the standard and URL-safe alphabets automatically.
Why would I wrap the output into lines?
Some formats need fixed-width lines: MIME email uses 76 characters per line and PEM certificates use 64. Turn on 64 or 76 wrapping to match — decoding simply ignores any line breaks.
What does the byte view show?
It shows the underlying bytes — the source bytes when encoding, the decoded bytes when decoding — as hexadecimal or binary, handy for inspecting binary data or debugging encodings. It sits next to the live byte and character counts.
Is my data uploaded to a server?
No. Everything runs entirely in your browser using built-in JavaScript encoding. The text you paste never leaves your device and is never sent to any server.

Related tools