All tools
# DEVELOPER

Base64 Encoder / Decoder

Base64 encode/decode + URL encode/decode. Browser-only, nothing sent anywhere.

Input
Output

Output will appear here…

Common Use Cases

API Authentication

Basic auth headers use Base64-encoded "username:password" in the Authorization header.

Data URIs

Embed images directly in HTML/CSS as Base64-encoded data:image/png;base64,... strings.

Email Attachments

MIME email attachments are Base64-encoded so binary files can travel through text protocols.

JWT Tokens

JSON Web Tokens encode the header and payload as Base64URL (a URL-safe variant of Base64).

URL Parameters

URL-encode strings to safely pass them as query parameters without breaking URL structure.

Config Files

Kubernetes secrets and environment variables often store sensitive values as Base64-encoded strings.

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a string of 64 ASCII characters (A–Z, a–z, 0–9, +, /). It's used to safely transmit binary data over systems designed to handle text — like email, HTML attributes, or HTTP headers. The encoded output is about 33% larger than the original.

Is Base64 a form of encryption?

No. Base64 is encoding, not encryption. Anyone can decode a Base64 string without a key. It's used for data representation, not security. If you need to protect data, use proper encryption (AES, RSA) rather than Base64.

What is the difference between Base64 and Base64URL?

Base64URL replaces + with - and / with _ and removes padding = characters. This makes the output safe for use in URLs and file names without percent-encoding. JWT tokens use Base64URL encoding.

What is URL encoding?

URL encoding (percent-encoding) converts characters that aren't safe in URLs into a % followed by two hex digits. For example, space becomes %20 and & becomes %26. It's required when passing special characters as URL query parameters.

Why does Base64-encoded output have = at the end?

Base64 encodes data in 3-byte groups. If the input length isn't divisible by 3, padding characters (=) are added to make the output length a multiple of 4. One or two = characters at the end is normal and expected.

Does this tool handle Unicode and emoji?

Yes. The encoder uses encodeURIComponent before calling btoa(), which handles multi-byte characters including accented letters, CJK characters, and emoji that would otherwise cause errors with the native btoa() function.

More developer tools

JWT decoder, regex tester, JSON formatter, password generator and more.

Browse all tools