Base64 Encoder & Decoder
Encode and decode Base64 text instantly in your browser.
How It Works
Enter Data
Paste plain text or Base64 encoded content into the input box.
Encode or Decode
Click Encode to convert text into Base64 or Decode to reverse it.
Copy Result
Copy the generated output with one click and use it anywhere.
About Base64 Encoding & Decoding
Base64 is a binary-to-text encoding scheme that converts binary data into a sequence of printable ASCII characters. It was originally designed to allow binary data — such as images and attachments — to be safely transmitted over text-based protocols like email (SMTP) and HTTP, which historically only handled plain text reliably. The name 'Base64' refers to the 64 printable characters used in the encoding alphabet: A–Z, a–z, 0–9, plus (+) and slash (/).
How It Works
Base64 encoding works by taking every 3 bytes (24 bits) of input and splitting them into four 6-bit groups. Each 6-bit group maps to one of the 64 characters in the Base64 alphabet. If the input length is not divisible by 3, padding characters (=) are appended to make the output a multiple of 4 characters. This tool uses JavaScript's native btoa() function for encoding and atob() for decoding, meaning all processing happens locally in your browser — no data is ever sent to a server.
Common Use Cases
- Embedding images directly in HTML or CSS as data URIs (e.g. src="data:image/png;base64,...").
- Encoding credentials for HTTP Basic Authentication headers (Authorization: Basic ...).
- Transmitting binary files or blobs through JSON APIs that only accept text payloads.
- Storing binary configuration data in environment variables or YAML/JSON config files.
- Decoding Base64-encoded tokens and payloads received from third-party APIs or JWT libraries.
- Encoding email attachments in MIME format for SMTP transmission.
Privacy & Security
- All encoding and decoding happens directly in your browser.
- No data is transmitted to any server.
- Base64 is not encryption and should not be used to protect sensitive information.
- Suitable for developers, APIs, emails, tokens, and data transport.