Base64 Encoder / Decoder - Free Online Base64 Tool
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is essential when embedding small image assets directly into HTML/CSS via Data URIs, constructing HTTP Basic Authentication headers, or inspecting encoded email MIME attachments.
When to Use This Tool
- Data URI Embedding: Embed small PNG/SVG images directly into CSS or HTML to eliminate extra HTTP requests.
- HTTP Basic Auth Header: Encode "username:password" credentials into the "Authorization: Basic ..." header format.
- Email MIME Inspection: Decode base64 encoded chunks found in raw email source files (.eml) or attachment headers.
- URL-Safe Token Generation: Replace + and / with - and _ to safely transmit payload strings through URL query parameters.
How to Use
- Choose Mode: Select whether you want to "Encode" plaintext to Base64 or "Decode" Base64 back to text.
- Input Data: Paste your string into the input area or upload a local file.
- Configure Options: Toggle the "URL-Safe" option if you need query-parameter friendly output (replaces + and /).
- Copy Result: Instantly copy the converted string to your clipboard or download it as a text file.
Input & Output Example
Input:
Hello, DevToolz! 반갑습니다 🚀
Output:
SGVsbG8sIERldlRvb2x6ISDrsJjqsJHsirXri4jrq6Qg8J+agA==
Frequently Asked Questions (FAQ)
Q. Is Base64 an encryption method?
A. No. Base64 is purely an encoding format for data representation, not encryption. Anyone can decode it back instantly. Never use Base64 alone to protect sensitive passwords or secret keys.
Q. Why does Base64 data size increase by ~33%?
A. Base64 represents 3 bytes (24 bits) of raw data using 4 ASCII characters (32 bits). Because 6 bits are mapped to 8 bits, the encoded size naturally expands by approximately 33%.
Q. What do the equal signs (=) at the end mean?
A. The equal sign (=) is padding. When the total number of input bytes is not divisible by 3, one or two padding characters are appended to ensure the output length is a multiple of 4.
Engineering & Privacy Notes
- Pure client-side processing: your files and text never leave your browser sandbox.
- Properly handles full UTF-8 multi-byte characters including Korean, Japanese, Chinese, and emojis.
Related Developer Tools
- URL Encoder: Encode special characters into percent-encoded strings for URL queries.
- JWT Decoder: Decode Base64URL-encoded JSON Web Tokens and inspect token claims.
- Hash Generator: Generate MD5, SHA-1, and SHA-256 cryptographic hashes from text.
- JSON Formatter: Format and beautify decoded JSON payloads with syntax error detection.