Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to text. Supports UTF-8 characters. Runs locally in your browser.
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters. It is commonly used to embed images in CSS, send binary data in JSON, include attachments in emails, and encode authentication tokens. The name comes from the 64-character alphabet it uses: A-Z, a-z, 0-9, plus (+), and slash (/).
How Base64 Encoding Works
Base64 takes every three bytes of input data and splits them into four 6-bit groups. Each group maps to one of the 64 characters in the Base64 alphabet. If the input length is not a multiple of three, padding characters (=) are added to the output. This process is deterministic and fully reversible, making it ideal for data transport but unsuitable for encryption.
Common Uses
- Embedding images in HTML/CSS as data URIs
- Encoding API keys and tokens for HTTP headers
- Sending binary data through text-based protocols like JSON or XML
- Email attachments via MIME encoding
- Storing binary blobs in databases that only support text fields
- Encoding credentials in HTTP Basic Authentication
Frequently Asked Questions
Is Base64 encryption?
No. Base64 is encoding, not encryption. It does not protect data. Anyone can decode Base64 strings. For security, use proper encryption like AES or RSA.
Why does Base64 make data larger?
Base64 encoding increases data size by about 33% because it represents 3 bytes of binary data as 4 ASCII characters. This trade-off is acceptable when you need to transmit binary data through text-only channels.
Is my data safe here?
Yes. All encoding and decoding happens in your browser using JavaScript. No data is sent to any server, and nothing is stored or logged.