Base64 Encoder / Decoder

Encode Unicode text as Base64 or decode standard Base64 into valid UTF-8 text entirely in your browser.

Loading the interface. JavaScript is required; controls stay disabled until ready.

Editable

Enter the text or Base64 string you want to convert.

Read-only

Select Convert to see your encoded or decoded text here.

Encode: up to 1,000,000 UTF-16 units. Decode: up to 4,000,000 Base64 units. Standard padded Base64 only; whitespace is ignored, URL-safe variants and binary files are not supported.

How to use

Choose encode or decode and paste text. Convert; invalid Base64 or non-UTF-8 bytes produce an error. Copy plain-text output or reset.

Examples & use cases

Hello becomes SGVsbG8=. Unicode text such as café and emoji round-trips through UTF-8.

About this tool

Encoding uses TextEncoder UTF-8 bytes and bounded chunks before Base64 encoding. Decoding validates standard padded syntax and canonical padding bits, then uses a fatal UTF-8 TextDecoder. Encode limit: one million UTF-16 units; decode limit: four million Base64 units. Binary files and URL-safe Base64 are not supported.

Questions & answers

Does Base64 encrypt my text?

No. Base64 is a reversible representation of bytes, not encryption. It provides no secrecy or authentication. Decoded output is displayed as plain text and is never executed.

Convert a known text example

Base64 represents bytes with printable characters. It is useful when a text-oriented format needs to carry byte data, but the representation is reversible and does not hide a secret. This page is specifically a text converter, not a binary-file decoding service.

A practical example

Hello encodes as SGVsbG8=. The encoder first creates UTF-8 bytes, which matters for accented characters and emoji. The decoder requires valid UTF-8 output rather than inventing readable text for arbitrary binary bytes. A syntactically plausible Base64 value can therefore still be unsuitable for this text-only conversion.

Standard Base64 differs from Base64url

Standard characters and padded syntax are validated, including canonical padding bits. The URL-safe alphabet used by JWT segments is outside this tool scope. Use the JWT decoder for a supported compact token instead of manually treating its segments as ordinary padded Base64.

Do not confuse encoding with security

Anyone able to decode a value can recover its original content; the conversion does not authenticate it or make it confidential. This page leaves output inert and processes it locally, but copied text and surrounding application logs are separate considerations. Check whether you need text, a binary decoder or a format-specific parser before converting.

Worked example: building a Basic Auth header

An API asks for HTTP Basic authentication with the username demo and the password test123. Join them with a colon to get demo:test123, then encode that text. The result is ZGVtbzp0ZXN0MTIz, and the header becomes Authorization: Basic ZGVtbzp0ZXN0MTIz. Decoding the string shows the original pair immediately, which is why Basic Auth must always travel over HTTPS. Use made-up values like these when testing, never a real password.

More questions about the Base64 Encoder / Decoder

Is Base64 a form of encryption?

No. Base64 is an encoding that turns bytes into 64 safe text characters so they can travel through email, JSON or URLs. Anyone can reverse it without a key. If you need to protect a secret, use real encryption such as AES, or a password hash such as bcrypt or Argon2, and treat Base64 only as a transport format.

Why does Base64 output end with = signs?

Base64 works in groups of three bytes that become four characters. When the input length is not a multiple of three, one or two = signs pad the final group. Hello encodes to SGVsbG8= with one pad character. Some systems, such as JWTs, use the URL-safe variant and drop the padding entirely.

Why is the encoded text longer than the original?

Every three bytes of input become four characters, so Base64 output is about 33 percent larger. A 30 KB image becomes roughly 40 KB as a data URI. That overhead is fine for small icons or tokens, but large files are usually better sent as normal binary uploads.

Choose your next task

  • JWT decoder: Inspect supported Base64url-based token claims without claiming authenticity.
  • URL encoder and decoder: Use percent encoding for a URL component instead of Base64.