Base64 Encoder/Decoder
Encode text or files to Base64 format and decode Base64 strings back to original content instantly.
About Base64
Base64 is a binary-to-text encoding scheme that represents binary data in ASCII string format. It's commonly used for:
- Embedding images in HTML/CSS (data URIs)
- Encoding email attachments (MIME)
- Storing complex data in JSON
- Transmitting data over text-based protocols
How to Use Base64 Encoder/Decoder
How to Use the Base64 Encoder/Decoder
- Select mode: Choose whether you want to Encode (text to Base64) or Decode (Base64 to text).
- Enter your input: Paste or type your text/Base64 string in the input area.
- Optional: Select variant: Choose standard Base64 or URL-safe encoding.
- View result: The converted output appears instantly in the output area.
- Copy output: Click the copy button to copy the result to your clipboard.
Encoding Example
Input: Hello, World!
Output: SGVsbG8sIFdvcmxkIQ==
Decoding Example
Input: SGVsbG8sIFdvcmxkIQ==
Output: Hello, World!
Features
- Encode text to Base64
- Decode Base64 to text
- URL-safe Base64 option
- File to Base64 conversion
- Real-time encoding/decoding
- Handles Unicode and UTF-8
- No size limits
- MIME line-break option
- One-click copy
- Privacy focused - no server upload
- Mobile-friendly interface
- Free with no registration
About Base64 Encoder/Decoder
Base64 encoding transforms binary data into ASCII text, enabling safe transmission through systems designed for text. Our converter handles both encoding and decoding for text strings and binary files, essential for web development, email, and API work.
How Base64 Works
Base64 represents binary data using 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). Every three bytes of input become four Base64 characters, increasing size by approximately 33%. This overhead is acceptable when text-safe transmission is required.
Common Applications
- Data URLs: Embed images directly in HTML/CSS without separate file requests
- Email Attachments: MIME encoding uses Base64 for binary attachments
- API Payloads: JSON APIs transmit binary data as Base64 strings
- Basic Authentication: HTTP Basic Auth encodes credentials in Base64
- Cryptographic Operations: Keys and signatures often use Base64 representation
URL-Safe Variant
Standard Base64 includes + and / characters that have special meaning in URLs. URL-safe Base64 substitutes - and _, avoiding encoding issues in query strings and paths. Our tool supports both variants for different contexts.