Features
- Encode and Decode tabs for text ↔ Base64
- File encoding via drag-and-drop or click-to-upload (FileReader)
- Shows file name and size for uploaded files
- Copy to clipboard button for results
- Dark theme with orange accent (#ff6b35)
- Zero dependencies — single HTML file
How It Works
Text encoding uses btoa() and atob() with UTF-8-safe encoding via encodeURIComponent. File encoding reads the uploaded file as an ArrayBuffer, converts to a binary string, then calls btoa() on the result. The UI uses CSS tabs (radio-button hack) to switch between encode/decode modes.
Usage
- Open
https://soumendrak.github.io/base64/in any browser. - No build step, no installation, no server required.
- Deploy anywhere — GitHub Pages, Netlify, or any static host.
git clone https://github.com/soumendrak/base64.git
# Open index.html directlyLicense
Licensed under the MIT License.
Built with ❤️ and zero dependencies