Encode Base64 Encoder / Decoder

Free online Base64 encoder. Type or paste any text and instantly get the Base64-encoded output. Runs entirely in your browser — your data never leaves your machine.

Plain Text
0 characters
Base64
0 characters

What is Base64 Encoding?

Base64 encoding converts binary data into a text representation using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It was designed to safely transmit binary data through text-only channels such as email (MIME), HTTP headers, and XML/JSON payloads that cannot handle raw binary.

Common uses of Base64 encoding include HTTP Basic Authentication (username:password → Base64), embedding images in HTML and CSS as data URIs, encoding JWT tokens and OAuth credentials, and serializing binary file contents into API requests that expect JSON.

This encoder converts any Unicode text to UTF-8 bytes first, then encodes those bytes to Base64. This ensures emoji, accented characters, and CJK characters are encoded correctly. The encoding runs entirely in your browser — your data is never sent to any server.

Frequently asked questions

How do I encode text to Base64?

Paste or type your plain text into the input field. The Base64-encoded output is generated instantly in the output field. You can then copy the encoded result.

Why do Base64 strings end with = or ==?

Base64 encodes 3 bytes at a time into 4 characters. If the input length is not a multiple of 3, one or two padding characters (=) are appended to make the output length a multiple of 4.

Can I encode special characters and Unicode text?

Yes. The encoder handles Unicode text by first converting to UTF-8 bytes, then encoding those bytes to Base64. This ensures non-ASCII characters (emoji, accented letters, CJK characters) are encoded correctly.

What is URL-safe Base64 encoding?

URL-safe Base64 replaces + with - and / with _ to avoid conflicts with URL syntax. This variant is used in JWTs, OAuth tokens, and file names. The encoder here uses standard Base64; switch to URL-safe if your target system requires it.

Try Sequel

Query your database in plain English.

Connect your database and get instant answers without writing SQL. Free for up to 3 seats — no credit card required.

Get started free