Base64 Encoder/Decoder
Encode or decode Base64 text and files.
🔒 Runs entirely in your browser — nothing is uploaded.
How Base64 Encoder/Decoder works
How does the Base64 encoder/decoder work?
Encoding pipes your text through encodeURIComponent and unescape before calling the browser's native btoa(), so multi-byte UTF-8 characters survive the conversion instead of throwing an error. Decoding reverses that with atob() then decodeURIComponent(escape(...)). Dropping in a file instead uses FileReader.readAsDataURL() and pulls out the Base64 portion after the comma automatically, switching the mode to encode.
What is Base64 encoding used for?
It is commonly used to embed small images as data URIs in CSS or HTML, to inspect the Base64-encoded segments of a JWT or API payload, or to check what a blob of encoded text from a config file or email attachment actually contains.
Does uploading a file to this tool send it anywhere?
No. The file input is read locally with the browser's FileReader API and never leaves your device - like every tool on this page, encoding and decoding happen entirely client-side in JavaScript, nothing is posted to a server.