Base64 Encoder & Decoder
Press Enter to encode, Shift+Enter for new line
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It uses a set of 64 characters (A-Z, a-z, 0-9, +, /) to represent data, making it safe for transmission over systems that only support text.
How Does Base64 Work?
Base64 encoding works by taking three bytes (24 bits) of input data and converting them into four Base64 characters (6 bits each). If the input length isn't divisible by 3, padding characters (=) are added to the output.
Example Conversion
| Original Text | Base64 Encoded |
|---|---|
| Hello | SGVsbG8= |
| Hello World | SGVsbG8gV29ybGQ= |
| Base64 is useful! | QmFzZTY0IGlzIHVzZWZ1bCE= |
Common Uses of Base64
- Email Attachments: MIME encoding uses Base64 to send binary files through email systems.
-
Data URLs: Embedding images directly in HTML/CSS using
data:image/png;base64,... - JSON/XML: Transmitting binary data in text-only formats.
- Authentication: HTTP Basic Authentication encodes credentials in Base64 format.
- JWT Tokens: JSON Web Tokens use Base64URL encoding.
Important Note
Base64 is NOT encryption! It's simply an encoding scheme.
Anyone can decode Base64 strings - don't use it to protect sensitive information.