Toggle language
Toggle theme
Back

Base64 Encoder/Decoder

Mode

Select encode or decode mode

Options

Use - and _ instead of + and /

Include = padding characters

No line breaks in output

Text Input

0 chars

Base64 Output

0 chars
0
Input Bytes
0
Input Chars
0
Output Chars
0%
Size Increase

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 printable characters (A-Z, a-z, 0-9, +, /) to encode data, making it safe for transmission over text-based protocols.

This free online tool allows you to encode text to Base64 or decode Base64 strings back to plain text. It supports full UTF-8 encoding, including special characters and emojis, and offers URL-safe encoding options.

All processing happens directly in your browser - your data never leaves your device, ensuring complete privacy and security.

Common Uses for Base64

Email Attachments

MIME protocol uses Base64 to encode email attachments, ensuring binary files can be transmitted over text-based email systems.

Data URLs

Embed images directly in HTML or CSS using Base64-encoded data URLs, reducing HTTP requests and improving page load times.

API Authentication

HTTP Basic Authentication uses Base64 to encode credentials. Many API tokens and JWT payloads are also Base64 encoded.

Data Storage

Store binary data in text-based formats like JSON, XML, or databases that don't natively support binary content.

Frequently Asked Questions

Is Base64 encoding secure?

Base64 is NOT encryption - it's just an encoding scheme. Anyone can decode Base64 data. Never use it to hide sensitive information. For security, use proper encryption algorithms.

Why does Base64 increase file size?

Base64 encoding increases data size by approximately 33%. This is because it converts 3 bytes of binary data into 4 ASCII characters. The trade-off is compatibility with text-based systems.

What is URL-safe Base64?

Standard Base64 uses + and / characters which have special meanings in URLs. URL-safe Base64 replaces these with - and _ to ensure the encoded string can be safely used in URLs without additional encoding.

Can I encode files with this tool?

This tool is designed for text-to-Base64 conversion. For file encoding, you would need to first read the file's binary content. However, you can paste the content of text files directly.

Is my data sent to a server?

No. All encoding and decoding happens entirely in your browser using JavaScript. Your data never leaves your device, making this tool completely private and secure.