Encode and decode Base64 strings with ease and accuracy
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used for encoding data in email, web applications, and data storage.
Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, and the characters + and /). It was designed to safely transmit binary data — such as images, files, or arbitrary bytes — through systems that were designed to handle text only, such as email protocols, URLs, and HTML.
The name "Base64" comes from the fact that the encoding uses 64 unique characters as its alphabet. Every 3 bytes of input data are represented as 4 Base64 characters, meaning encoded data is always approximately 33% larger than the original. The = padding characters at the end of a Base64 string indicate how many bytes were needed to complete the final group.
Decoding reverses this process exactly. Our Base64 tool performs both encoding and decoding instantly in your browser using the standard atob() and btoa() JavaScript APIs.
The original use case for Base64. Email protocols like SMTP were designed for 7-bit ASCII text. MIME (Multipurpose Internet Mail Extensions) uses Base64 to encode binary file attachments so they can be safely transmitted as email text.
Images and other media files can be embedded directly in HTML or CSS as Base64-encoded data URLs (data:image/png;base64,...), eliminating the need for separate HTTP requests for small images.
JSON is a text format that cannot natively represent binary data. Base64 is the standard way to include binary content (like file contents or cryptographic keys) inside JSON payloads.
Base64 encoding is sometimes used to make data less immediately human-readable — for example, encoding configuration values or simple string tokens. Note: Base64 is not encryption and provides no security.
HTTP Basic Authentication encodes the username:password pair as Base64. Many API tokens and JWT (JSON Web Token) headers and payloads are also Base64-encoded.
Standard Base64 uses + and / which have special meanings in URLs. A URL-safe variant uses - and _ instead, allowing Base64 data to be included in URLs without percent-encoding.
No. Base64 is encoding, not encryption. Anyone who receives a Base64-encoded string can immediately decode it using any Base64 decoder. It provides no confidentiality or security. If you need to protect data, use proper encryption (AES, RSA, etc.), not Base64.
The = padding characters indicate that the last group of input bytes was not a complete 3-byte group. One = means one padding byte was added; == means two padding bytes were added. Some implementations omit padding for URL-safe Base64.
Base64 encodes every 3 bytes as 4 characters, which means the output is always approximately 33% larger than the input. This overhead is the trade-off for making binary data safe to transmit in text-only systems.
This tool is designed for encoding and decoding text strings. For encoding binary files (images, PDFs, etc.) as Base64, you would need to first read the file's binary content and then encode it — a process better handled by code or a dedicated file-encoder tool.
Yes. All encoding and decoding happens entirely in your browser. No text you enter is transmitted to or stored on our servers. The process is completely local and private.