Plain Text input
Base64
Input: 0 chars
Output: 0 chars
Size change:

Common Base64 use cases

HTTP Basic Authusername:password → Base64
Data URIsdata:image/png;base64,...
JWT payloadsheader.payload.signature
API keysoften Base64-encoded secrets
Email (MIME)attachments encoded in Base64
Config filesk8s secrets, .env values

About This Tool

This free Base64 encoder and decoder converts plain text to Base64 and back in real time. Base64 encodes binary or text data using 64 printable ASCII characters (A-Z, a-z, 0-9, +, /), making it safe to embed in places that only support plain text — HTTP headers, JSON payloads, email attachments, and data URIs.

Switch between Encode and Decode mode and see live character counts and size change. All conversion happens locally using your browser's built-in btoa() / atob() functions — nothing is uploaded anywhere.

Frequently Asked Questions

What is Base64 encoding?+
Base64 is a binary-to-text encoding scheme that represents data using 64 characters (A-Z, a-z, 0-9, +, /) plus = for padding. It doesn't compress or encrypt data — it re-encodes it into a format that's safe to transmit through systems that only handle plain ASCII text, like email or URLs.
Is Base64 the same as encryption?+
No. Base64 is easily reversible by anyone — it provides no confidentiality at all. Decoding a Base64 string requires no key or password, just a decoder like this one. If you need to protect sensitive data, use real encryption (like AES) instead of Base64.
Why is the Base64 output longer than my original text?+
Base64 encodes every 3 bytes of input as 4 output characters, so encoded output is roughly 33% larger than the original. This overhead is the trade-off for making binary-safe data representable as plain text.
What do the + / = characters mean in Base64?+
+ and / are two of the 64 symbols used to represent 6-bit values, alongside A-Z, a-z, and 0-9. The = character is padding added at the end when the input length isn't a multiple of 3 bytes, so the output length is always a multiple of 4.
What is "URL-safe" Base64?+
Standard Base64 uses + and /, both of which have special meaning in URLs. URL-safe Base64 (used in JWTs, for example) replaces them with - and _ and often omits the = padding, so the encoded string can be used directly inside a URL or filename without escaping.
Can I encode images or other binary files with this tool?+
This tool is built for typed or pasted text. Encoding raw binary files (images, PDFs) would require a file-upload flow — for the common case of encoding a data URI or small text blob (like username:password for Basic Auth), plain text input works perfectly.