100% Client-Side WASMZero Remote NetworkVerified Spec

Base64 Encoder

Interactive Studio

Encode text to Base64 or decode Base64 back to plain text, with full Unicode support — instantly, in your browser. Instant feedback with zero server storage.

Loading tool…

About Base64 Encoder

Base64 is not encryption — it's a way of representing arbitrary binary data using only 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). Every three bytes of input become four Base64 characters, which is why encoded output is always about 33% longer than the original. This tool encodes text into that format, or decodes Base64 back into the original text, using your browser's built-in TextEncoder/TextDecoder so multi-byte UTF-8 characters like emoji and accented letters round-trip correctly.

The reason Base64 exists at all is that many older text-based protocols and formats — email (MIME attachments), JSON payloads, URLs, CSS data URIs, XML — can't safely carry raw binary bytes, since control characters or non-ASCII bytes can break the parser. Base64 sidesteps that by shrinking the alphabet down to something every text channel can pass through untouched. Anyone can decode it instantly, so it should never be used to hide passwords, tokens, or anything that needs real confidentiality — for that you need actual encryption with a key.

Common uses include embedding small images directly in HTML or CSS via data URIs, encoding binary attachments for email, and packing authentication tokens (like the payload of a JWT) into a URL-safe string.

How to use Base64 Encoder

  1. Choose Encode or Decode.
  2. Paste the text or the Base64 string.
  3. Copy the result.

Worked examples

Input: Hello

Result: SGVsbG8=

Input: SGVsbG8=

Result: Hello

Background

Base64 represents binary data using 64 printable characters. Every three bytes become four characters, so output is about 33% larger. The = sign at the end is padding when the input length is not a multiple of three.

Base64 is encoding, not encryption. Anyone can decode it, so never use it to hide secrets. It is used to embed small images in CSS, send binary in JSON and carry credentials in HTTP Basic auth headers.

Common mistakes

  • Treating Base64 as a way to protect passwords.
  • Decoding a URL-safe Base64 string that uses - and _ with a decoder expecting + and /.
  • Pasting a string with whitespace or missing padding and getting a decoding error.

Frequently Asked Questions

Does this support Unicode text?
Yes — text is UTF-8 encoded before Base64 conversion, so emoji and non-Latin characters work correctly.
Is Base64 the same as encryption?
No. Base64 is a reversible encoding scheme, not a cipher — anyone can decode it with no key or password. Use it for safely transporting binary data through text-only channels, never for securing sensitive information.
Why is the encoded output longer than my input?
Base64 groups input into 3-byte chunks and maps each chunk to 4 output characters, so encoded text is roughly 33% larger than the original — that overhead is the tradeoff for using a restricted, universally-safe character set.
Why did decoding fail with an error?
Valid Base64 only contains A-Z, a-z, 0-9, +, /, and = padding at the end, and its length must be a multiple of 4. If the pasted text was truncated, has extra whitespace, or uses the URL-safe variant (- and _ instead of + and /), decoding will fail.

Fast, local-first developer micro-tools with zero tracking or latency.

Browse All Tools
Local-First Architecture: Toolium parses payloads exclusively in browser memory. Zero network telemetry.
⌘C Copy⌘K Palette