Base64 Encoder & Decoder
developer
Convert text and files to Base64 format and back. Support for URL-safe Base64.
Input
Output
1. How to Use
- Text Mode: Enter text in the input field and click Encode or Decode. Use Copy to copy the result.
- File Mode: Drag & drop or choose a file to upload. The Base64 string appears in the output. Use Download File to decode the Base64 back to the original file and save it.
- URL-safe option: Check the box for URL-safe Base64 (replaces + with - and / with _).
2. How It Works
Base64 encoding converts binary data into ASCII text using 64 characters (A-Z, a-z, 0-9, +, /).
Text encoding uses btoa/atob with UTF-8 handling via encodeURIComponent/decodeURIComponent.
File mode uses FileReader to read files and converts to Base64 data URL.
3. About Base64
Free online Base64 encoder and decoder for text and files. Supports URL-safe Base64 for use in URLs and APIs.
4. Advantages
- Text and file encoding/decoding.
- URL-safe Base64 option.
- Copy to clipboard and file download.
5. Use Cases
- API development: Encode binary data for transmission.
- Data storage: Store binary data in JSON or text files.
- Email attachments: Encode files for MIME.