About the Handiwork Base64 Encoder
The Base64 Encoder converts text and files to and from Base64 with live results. Choose encode or decode, type or paste your input, or upload a file — output updates instantly in your browser with UTF-8 support. Nothing is uploaded to a server.
How to use the Handiwork Base64 Encoder
- Choose Encode or Decode.
- Type or paste text, or upload a file to encode.
- Copy the live result from the output panel, or swap direction to reverse the conversion.
What is Base64 encoding?
Base64 represents binary data using 64 printable ASCII characters. It is not encryption — it simply makes arbitrary data safe to transmit through channels that only reliably handle text, such as email bodies, JSON payloads, and data URIs embedded in HTML or CSS.
When to use Base64
Common uses include embedding small images directly in HTML/CSS as data URIs, encoding credentials for HTTP Basic Auth, and storing binary blobs in text-only fields. The tool shows character count, byte size, and approximate size increase when encoding — Base64 adds roughly 33% overhead, so it suits small payloads rather than large files.
How UTF-8 text is safely encoded
The browser’s built-in btoa() function only accepts Latin1 text, so encoding is done through a two-step conversion: the input is first percent-encoded as UTF-8 bytes with encodeURIComponent(), then that byte sequence is passed to btoa(). Decoding reverses the same two steps. This is the documented workaround for handling arbitrary Unicode text with btoa()/atob(), which is why emoji and non-Latin scripts round-trip correctly.
Why the output is about a third larger
Base64 represents every 3 bytes of input as 4 output characters, so encoded text is roughly 4/3 (about 33%) larger than the original — plus up to two padding = characters at the end when the input length isn’t a multiple of 3. That overhead is fixed by the encoding itself and does not depend on what the data contains.
Continue this workflow
Use the adjacent tool when the next step calls for a different input, output, or method.
Assumptions and limitations
- Base64 is an encoding, not encryption or compression — it adds no confidentiality and increases size by roughly a third, so it is unsuitable for protecting secrets or shrinking large files.
- Very large files can be slow to encode or exceed available browser memory, since the whole file is read and converted in memory rather than streamed.
- The UTF-8 safe-encoding technique relies on encodeURIComponent()/decodeURIComponent(); text that is not valid Unicode, or Base64 input that was produced by a different encoding scheme, may not round-trip correctly.
Sources and standards
These authoritative references were used to verify the method and guidance on this page.
Frequently asked questions
Is Base64 a form of encryption?
No. Base64 is reversible encoding, not encryption. Anyone can decode it, so never use it to protect secrets.
Does Base64 support Unicode text?
Yes. This tool handles UTF-8, so emoji and non-Latin characters encode and decode correctly.
Can I encode a file?
Yes. In encode mode, use the file upload area to select a file. The Base64 output appears instantly, along with the file name and size. Processing happens entirely in your browser.
Why is the encoded output longer than my original text?
Base64 always expands the data by roughly a third (4 output characters for every 3 input bytes), plus up to two padding characters at the end. This overhead is inherent to the encoding, not a setting you can turn off.