Encode text to Base64 or decode Base64 to text
Click on an example to load it into the converter: Click on any example to load it into the input field, or use "Quick Run" to automatically encode/decode:
Hello World!
你好世界!这是一个中文测试。
https://example.com/path?param=value&other=data
{"name":"John Doe","email":"john@example.com","active":true}
Base64 encoding is a binary-to-text encoding scheme that converts binary data into ASCII string format. It's widely used for encoding binary data that needs to be stored and transferred over media designed to deal with textual data. Our free online Base64 encoder/decoder tool handles text and binary data conversion instantly.
Our Base64 encoder uses JavaScript's built-in btoa() and atob() functions with proper Unicode handling via encodeURIComponent() for international characters. The algorithm maps every 3 bytes of binary data to 4 Base64 characters using a 64-character alphabet (A-Z, a-z, 0-9, +, /) with padding (=) for incomplete byte groups.
Encode/decode both text strings and binary files
Generate URL-safe Base64 encoding variants
Upload and encode image and document files
All processing happens locally in your browser
Data URI Scheme: data:image/png;base64,iVBORw0KGgo... - Used for embedding images directly in HTML/CSS
Email Attachments: binary MIME encoding for attachments in email systems (SMTP)
Database Storage: Converting BLOBs to TEXT columns while preserving binary integrity
JWT Tokens: Payload section in JSON Web Tokens for API authentication
API Responses: Serializing complex objects for JSON API responses
Developer needs to include a small icon in an email but wants to avoid attachment limitations.
Result: Email displays the icon without requiring external file attachments.
Mobile app developer needs to encode user credentials for Basic Authentication in API requests.
Result: Credentials are safely encoded for HTTP Basic Authentication.
Backend developer needs to store a small PDF file in a JSON database field.
Result: Binary PDF content is now stored as text in the JSON database field.
Select 'Encode' to convert text/binary to Base64, or 'Decode' to convert Base64 back to original format.
Type text or upload a file (images, documents) that you want to encode or decode.
Click the convert button to instantly see the Base64 encoded or decoded result.
Copy the result for use in your applications, APIs, email templates, or data storage.
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used to transmit binary data over systems that can only reliably handle text, such as email or certain web APIs.
Yes, this Base64 encoder and decoder is completely free to use. No signup or registration required. Your data is processed locally in your browser for maximum privacy and security.
Yes, our Base64 tool works completely offline. All encoding and decoding happens in your browser using JavaScript, so you can use it without an internet connection.
Absolutely. All Base64 encoding and decoding happens locally in your browser. Your data is never sent to any server or stored anywhere, ensuring complete privacy and security.
Base64 is NOT encryption. It provides no security or privacy. Only use for data format conversion, never for protecting sensitive information. For encryption, use proper cryptographic algorithms like AES.
Discover more tools and guides to help you with your development workflow