Base64 Encoder & Decoder
Encode UTF-8 text to standard Base64 or decode Base64 back to readable text in this page's tool workspace. Ordinary site requests, extensions, and managed-device services are separate paths.
About this base64 encoder & decoder
Encode converts well-formed Unicode text to UTF-8 bytes and maps each three-byte group to four standard Base64 characters. Decode reverses the byte mapping and then requires valid UTF-8. A leading U+FEFF character is preserved as text instead of silently removed.
How this tool works
Encode converts well-formed Unicode text to UTF-8 bytes and maps each three-byte group to four standard Base64 characters. Decode reverses the byte mapping and then requires valid UTF-8. A leading U+FEFF character is preserved as text instead of silently removed.
- Choose Encode and paste the example in Plain text.
- Compare Base64 output with the example.
- Choose Decode and paste that output into Base64 input to recover the original text.
Worked example
Scenario: Both Encode and Decode update the result as you type. Enter CZOA 中文 😀 in Encode mode to obtain the complete Base64 output printed in the example. Switch to Decode and paste that full output to recover the original text.
Sample input:
Processing: Encode converts well-formed Unicode text to UTF-8 bytes and maps each three-byte group to four standard Base64 characters. Decode reverses the byte mapping and then requires valid UTF-8. A leading U+FEFF character is preserved as text instead of silently removed.
Illustrative output:
Limits and verification
This is a UTF-8 text tool, not a binary-file decoder. It rejects malformed UTF-8, incomplete byte groups, nonzero padding bits, the Base64URL alphabet and data-URL prefixes. Space, tab, CR and LF are ignored in Base64 input; other nonalphabet characters are rejected. Missing trailing padding is accepted when the remaining length and pad bits are valid. Empty text produces empty output. Encoding rejects unpaired UTF-16 surrogates. Large text is limited by tab memory.
Examples demonstrate an expected workflow; they do not prove every input or every branch of an external specification. Check important results with an independent source before using them for money, security, compliance, safety, or irreversible file changes.
Browser processing boundary
Tool input is processed by code running in the browser and is not intentionally sent to a CZOA processing API. The page can still request ordinary site assets, analytics, or advertising when those services are enabled. Browser extensions and managed-device software remain outside this tool's control.
Relevant references
These references govern or help explain the format, protocol, or calculation used here. Listing a reference does not claim certification or complete implementation of every optional feature.
Content owner: CZOA Tools · Review methodology
How to use it
- Choose Encode and paste the example in Plain text.
- Compare Base64 output with the example.
- Choose Decode and paste that output into Base64 input to recover the original text.
Frequently asked questions
How does the Base64 encoder and decoder handle Unicode and a leading BOM?+
Encode converts well-formed Unicode text to UTF-8 bytes and maps each three-byte group to four standard Base64 characters. Decode reverses that mapping and requires valid UTF-8. A leading U+FEFF is preserved as text rather than silently removed.
What local example can I run?+
Enter `CZOA` in Encode mode. The result is `Q1pPQQ==`.
Which Base64 characters, padding, and bytes are accepted?+
This tool processes UTF-8 text, not binary files. It rejects malformed UTF-8, incomplete groups, nonzero padding bits, Base64URL characters, and data-URL prefixes. It ignores space, tab, CR, and LF in Base64 input; final padding may be omitted when length and padding bits are valid. Empty input yields empty output, and encode rejects unpaired UTF-16 surrogates.
Does Base64 protect a secret or make text smaller?+
No. Base64 is reversible, keyless text encoding with no confidentiality or authenticity. Its padded output length is 4 × ceil(UTF-8 byte count / 3); this tool does not compress, encrypt, or authenticate text.
