Base64 Encoder
Encode text or files as Base64 in your browser, with URL-safe and MIME options.
Jump to toolEncode to Base64 format
Type or paste text to encode it as Base64. For images and other files, use the file section below.
Advanced options
Encoded output
Encode files to Base64 format
Choose a text or binary file up to 10 MB. It is encoded in your browser and never uploaded.
What Is Base64 Encoding?
Base64 encoding turns any data, including binary files, into plain text made of 64 safe characters: A–Z, a–z, 0–9, + and /. It is used wherever only text can travel, such as email attachments, data URLs in web pages and API tokens. It is an encoding, not encryption, so anyone can decode it.
This tool encodes text, or files up to 10 MiB, in your browser, with options for URL-safe output, encoding each line separately and 76-character line wrapping for MIME.
How to Encode Data as Base64
- Type or paste data into Data to encode, or open a text or binary file.
- Set the options you need, such as the destination character set or encoding each line separately.
- Select ENCODE, or turn on Live mode to encode as you type.
- Select Copy to clipboard or Download to keep the Base64 output.
How Base64 Works
Base64 takes the data three bytes at a time and turns those 24 bits into four characters from a 64-character alphabet. Man becomes TWFu. When the input does not divide evenly into three bytes, = signs pad the end.
The output is about 33 percent larger than the input, which is the price of making it safe to send as plain text.
Encoding Options
| Option | When to use it |
|---|---|
| URL-safe | Replaces + and / with - and _, for URLs, filenames and JSON Web Tokens |
| Encode each line separately | When each line is a separate value |
| 76-character wrapping | For email (MIME), which expects lines no longer than 76 characters |
Base64 Is Not Encryption
Anyone can decode Base64, so never use it to hide passwords or secrets. It only changes how data is represented.
Base64 Encoder FAQ
Need to decode Base64?
Turn Base64 back into text or files.
Related Tools
Tools that often come next after this one