Base64 Encoder / Decoder

Convert between UTF-8 text and standard Base64. Base64 is encoding, not encryption.

EncodingInstant

Parameters

Result

Fill in the parameters and run

Encode and decode UTF-8 text with Base64

Encode UTF-8 text as standard Base64 or decode Base64 back into UTF-8 text. Base64 represents every three bytes with four characters, using = padding when needed. Processing stays in your browser. This text tool does not read arbitrary binary files.

Base64 in Data URLs, email and API debugging

Front-end developers inline small images as Data URLs to save a request; email (MIME) uses Base64 to carry attachments over a text-only channel; HTTP Basic auth encodes “user:password” into the Authorization header; and Base64 is the standard fallback for embedding binary data inside JSON or XML.

The reverse direction is just as common when debugging: a string starting with eyJ is usually a JWT, and an opaque config value often reveals itself after a quick decode.

Base64 size overhead and security limits

Base64 is encoding, not encryption — anyone can decode it instantly, so never use it to “protect” secrets. Encoded output is about 33% larger than the input, which makes it a poor choice for large files. Standard Base64 also uses + and /, which clash with URL syntax; use the Base64URL variant (- and _, no padding) in URLs. This tool handles UTF-8 correctly, so Chinese text round-trips without mojibake.

Does this decoder support Base64URL or binary files?

It decodes standard Base64 into UTF-8 text. It does not convert Base64URL characters - and _ to + and /; input containing those URL-safe characters is rejected. Strings using only the shared alphabet may work, but this is not full Base64URL support.

Decoded bytes must be valid UTF-8; images and other binary files may fail this check. For JWT headers and payloads, use JWT Decoder, which handles Base64URL without verifying the signature.

Loading assistant…