Base64 Encoder / Decoder
Encode any text to Base64 or decode Base64 strings back to readable text — instantly, in your browser.
Encode Text → Base64
Decode Base64 → Text
What is a Base64 Encoder and Decoder?
A Base64 Encoder and Decoder is a fundamental developer tool used to translate normal text or binary data into a safely transmittable ASCII string layout. "Base64" represents the 64 characters used in the alphabet (A-Z, a-z, 0-9, +, and /). When you encode data, you are converting it into this universal format so it survives transport mechanisms that aren't designed to handle raw binary or special characters.
When Do Developers Use Base64?
Base64 encoding is everywhere on the modern internet. Some of the most common development scenarios include:
- Embedding Images in HTML/CSS: Instead of loading an external `.png` or `.svg` file, you can encode the image into a Base64 Data URI and embed it directly inline. This saves a network request and speeds up page load times for small icons.
- Sending Mail via SMTP: Email protocols originally only supported 7-bit ASCII characters. If you send an email with an attachment, your email client automatically encodes that file into Base64 so the mail server can process it.
- JSON Data Payloads: JSON cannot natively store unescaped binary data. If an API requires you to upload a file within a JSON body, you must convert the file to a Base64 string first.
- Basic HTTP Authentication: The standard HTTP "Basic Auth" header requires your `username:password` string to be encoded in Base64 before transmission.
How to Encode and Decode
Our tool requires no software installation and runs securely in your browser:
Encode to Base64: First, paste your normal text (including emojis or special characters) into the Plain Text Input box. Click the "Encode" button, and the browser's native JavaScript `btoa()` function securely transforms it into an unreadable Base64 string.
Decode to Text: Take any Base64 string you've received from an API or database, paste it into the Base64 Input box, and click "Decode". Our tool instantly reverses the process using the `atob()` function, revealing the original plain text without sending the data to any external server.