How this tool computes its result
Encodes text via btoa(unescape(encodeURIComponent(text))), a three-step chain that first converts the string into a UTF-8 byte-safe percent-encoded form before running the browser's built-in binary-to-Base64 conversion — necessary because btoa() alone only handles Latin1 and throws on multi-byte UTF-8 characters. Decoding reverses the chain: decodeURIComponent(escape(atob(base64))). File encoding uses FileReader.readAsDataURL() and then strips the leading "data:<mime>;base64," prefix so only the raw payload remains. The stats panel reports original byte size (via Blob), encoded size, and overhead percentage computed as (encoded.length / original.length − 1) × 100.
