Base64 represents bytes as copyable characters. It neither encrypts nor compresses them. The Base64 Converter supports UTF-8 text encoding and encoding the exact bytes of a selected file.
Examples and size calculation
| Input | Input bytes | Standard Base64 | Output characters |
|---|---|---|---|
f |
1 | Zg== |
4 |
fo |
2 | Zm8= |
4 |
foo |
3 | Zm9v |
4 |
あ in UTF-8 |
3 | 44GC |
4 |
For padded output without line breaks, n input bytes produce 4 × ceil(n / 3) characters. 1,024 bytes produce 1,368 characters, about 33.6% larger. This excludes data-URL prefixes or JSON quotation marks. Padding can make the percentage larger for tiny inputs.
Standard versus URL-safe alphabet
| Setting | Standard Base64 | Base64url |
|---|---|---|
| Alphabet difference | + and / |
- and _ |
| Encode mode | Default | Select the checkbox |
| Padding on encode | Included | Also included by this tool |
| Missing input padding | Rejected by default | Allow explicitly if the contract permits |
Bytes fb ff encode as +/8= or -_8= respectively. Selecting Base64url does not automatically remove padding. Check the destination’s alphabet and padding rules. Decoding a JWT payload does not verify its signature or authentication status.
Troubleshooting table
| Input or condition | Action or result |
|---|---|
Zg |
Allow missing padding to decode f |
ASCII line breaks in Zg== |
Select Ignore ASCII whitespace when appropriate |
-_8= |
Select Base64url; do not mix alphabets |
Zh== |
Rejected for noncanonical pad bits |
data:image/png;base64,... |
Remove the prefix; enter only the Base64 payload |
//4= |
Produces bytes ff fe, which are not valid UTF-8 text |
The whitespace option covers ASCII spaces, tabs and line breaks, not every invisible Unicode character. Choose settings from the producer’s format rather than blindly repairing input.
Text and file workflows
For text, encode あ to 44GC, then paste the output into the input before decoding back to あ. Both buttons read the input field.
For file bytes:
- Select a file and confirm the loaded-byte status.
- Press Encode; file selection alone does not perform the transformation.
- Paste the Base64 string into the input and press Decode.
- Inspect Hex and use Download bytes. The filename is
decoded.bin; the original name and extension are not recovered automatically.
If UTF-8 decoding fails, the text output may be empty while Hex and byte download remain available. File selection is for encoding bytes, not for automatically decoding a Base64 text file. Edit the input or clear it to leave file mode.
Treat output as the same information
The implementation transforms data in the browser without uploading the input. This does not guarantee secrecy against browser extensions, clipboard exposure or insecure storage, nor does it mean loading the page involves no network requests. Treat Base64 output as having the original data’s sensitivity.
Frequently asked questions
Does Base64 make a file smaller?
Normally it increases the size. Compression serves a different purpose.
Does successful decoding prove a file is safe?
No. Recovering bytes does not validate their origin or safety. Do not execute an unknown file just because decoding succeeded.
Return to the same workflow
Open the Base64 Converter, reproduce the small example and inspect the result before processing your own data. Favorite the tool near its name to reopen it through My Tools in the same browser. Favorites store the tool choice, not your inputs or files; clearing site data removes them. See the URL encoding guide before placing encoded data into a URL value.
Scope and evidence
On October 25, 2026 we compared these steps and examples with the published implementation. Primary references support the standard or API; the output tables and limits describe Tools Hub. This is not a speed or capacity benchmark, a guarantee for every environment or professional certification.