Base64 Encode Online
Convert text, images, hex, or binary into Base64 instantly. Choose character encoding (UTF-8 recommended) and copy output for APIs, email, JSON, and web apps.
Input type
Character encoding
Base64 encoding turns data into a text-safe format so it can travel reliably through systems that expect plain text. It’s widely used in web development, cybersecurity workflows, and data transport (for example: JSON payloads, HTML embeds, and email).
How to Base64 Encode
- Select an Input type (Text, Image, Hex, or Binary).
- Pick a Character encoding (UTF-8 is best for most text).
- Paste input (or upload a file) and click Encode.
- Copy the Base64 output, or use Swap to open the Decode page with your result.
Need to reverse it? Open Base64 Decode or click Swap.
Common Use Cases
- Embed an image directly in HTML/CSS using a data URL (data:image/...;base64,...)
- Send binary safely through JSON / REST APIs
- Store small assets or tokens in configuration files
- Transfer data through systems that break on special characters or binary bytes
- Debug encoded payloads during integration or security testing
Examples
Text: "hello"
aGVsbG8=
Text: "Base64"
QmFzZTY0
Tip
If your Base64 has line breaks/spaces, remove them before decoding.
Tip: Base64 is reversible. Treat encoded strings with the same care as the original data (especially keys, tokens, or credentials).
FAQ
What is Base64 encoding?
Base64 is an encoding method that represents bytes as printable ASCII characters. It’s commonly used to transport data in text-only channels like JSON, HTML, and email.
Is Base64 encryption?
No. Base64 is not encryption and provides no security by itself. Anyone can decode Base64 back to the original data.
Why does Base64 increase data size?
Because Base64 converts every 3 bytes into 4 characters, the output is typically ~33% larger than the original binary data.
Which character encoding should I choose?
Use UTF-8 for most modern text. If you need legacy text compatibility, choose the specific encoding that matches your source system.
Why does Base64 end with '='?
The '=' characters are padding. They help ensure the output length aligns correctly for decoding.
How do I Base64 encode an image?
Select IMAGE input type, upload your file, and click Encode. You can also decode back to an image on the Decode page.
Can I decode what I encoded here?
Yes—use the Swap button or open the Base64 Decode page and paste your encoded string.
Should I paste secrets here (keys, passwords, tokens)?
Avoid pasting real secrets on shared devices. Base64 is reversible, and encoded data should be treated like the original content.