EN

Base64 Encoder / Decoder

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters: uppercase A–Z (26), lowercase a–z (26), digits 0–9 (10), plus (+) and slash (/), with equals (=) used as padding. It was designed to safely transmit binary data over text-based protocols that might corrupt raw binary bytes. Today it appears throughout web development: data URI images embedded in CSS, Basic Auth headers, JWT tokens, MIME email attachments, and API payloads containing binary content.

The most visible use of Base64 in modern web development is the data URI format: data:image/png;base64,... — embedding an image directly in HTML or CSS without an additional HTTP request, useful for small icons and inline backgrounds. JWTs (JSON Web Tokens) use Base64url encoding (a variant using - and _ instead of + and /) for their header and payload sections. Basic HTTP authentication sends credentials encoded as Base64 in the Authorization header. Recognizing and decoding Base64 in API responses is a foundational debugging skill for developers.

Important: Base64 is encoding, not encryption. Anyone can decode Base64 with no key or password — it provides zero confidentiality. Never use Base64 to protect sensitive data. Base64 increases data size by approximately 33%: every 3 bytes of binary become 4 Base64 characters. This size trade-off is acceptable because the encoded data is safe to transmit over any text-based channel. This tool supports standard Base64 (RFC 4648). All encoding and decoding runs locally in your browser — nothing is sent to any server.

Frequently Asked Questions

What is Base64 encoding?
Base64 converts binary data into a string of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). It lets binary data travel safely over text-based systems like HTTP headers, email, or JSON without corruption.
How do I encode text to Base64?
Paste your text in the input area, select Encode, and the Base64 output appears instantly. Click the copy button to copy the result to your clipboard for use in code or configuration.
What is Base64 commonly used for?
Base64 is used for embedding images in CSS as data URIs, encoding JWT token payloads, transmitting email attachments via MIME encoding, encoding binary data in JSON API responses, and Basic HTTP authentication credentials.
Is Base64 a form of encryption?
No. Base64 is purely an encoding scheme — it is completely reversible without any key. Anyone who receives Base64-encoded data can decode it instantly. Never use Base64 to protect sensitive information like passwords or private data.
Why does Base64 output sometimes end with == or =?
The = characters are padding. 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 added to complete the final group.
How much larger is Base64 output than the original?
Base64 output is approximately 33% larger than the original data. Every 3 input bytes produce 4 output characters — so a 1 MB binary file becomes about 1.33 MB when Base64-encoded.
What is the difference between standard Base64 and Base64url?
Standard Base64 uses + and / characters, which have special meaning in URLs. Base64url replaces + with - and / with _, making it safe to use directly in URLs and filenames. JWTs use Base64url for their header and payload sections.