Base64 Encoder
Encode text or files to Base64 format for safe data transmission.
Frequently Asked Questions
Can this encode Unicode text like emoji or accented characters?
Yes. The text path wraps your input with `encodeURIComponent` before calling `btoa`, so normal Unicode text is converted more safely than plain `btoa(raw)` would allow.
Can I encode a file instead of pasted text?
Yes. Use the file picker and the tool reads the file with `FileReader.readAsDataURL()`, then keeps only the Base64 part after the comma.
Why do I only get raw Base64 instead of `data:image/png;base64,...`?
Because the file workflow intentionally strips the Data URL prefix. The output is the bare encoded payload so you can paste it into APIs or other tools more easily.
Does this encode live while I type?
No. Encoding is button-driven here. Use `Encode →` for text or the file picker for file input.
What does the Swap button do?
It swaps the current input and output textareas. That is handy if you want to encode something, inspect it, and then immediately feed the result back in for another step.