Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 back to text. Supports file encoding too.
Base64 Encoder / Decoder
Convert text and files to Base64 and back. Supports Unicode, URL-safe encoding, and drag-and-drop.
About Base64 Encoder/Decoder
This tool uses the modern TextEncoder / TextDecoder API for flawless Unicode support (Emoji, CJK, Arabic, etc.). Toggle URL-safe for RFC 4648 §5 compliant output (safe for URLs and filenames). Drag and drop any file to encode it, or paste Base64 to decode it back. All processing happens locally in your browser.
What Is Base64 Encoding?
Base64 is a method of encoding binary data — or any data — into a format that uses only 64 safe ASCII characters: A-Z, a-z, 0-9, plus (+), and slash (/). The reason Base64 exists is that many systems and protocols were originally designed to handle only text, not raw binary data. Email systems, for example, use Base64 to safely attach images and files to messages without the binary data getting corrupted in transit.
Base64 is not encryption. It is an encoding scheme — anyone with a Base64 decoder can instantly reverse it. Do not use Base64 to protect sensitive information. Use it only to safely transmit data through text-based channels.
When Do Developers Use Base64?
- Embedding images in HTML or CSS — as data URLs to avoid extra HTTP requests.
- API authentication — Basic Auth sends credentials as Base64-encoded username:password.
- Email attachments — MIME standard encodes file attachments in Base64.
- JSON Web Tokens (JWT) — the header and payload sections are Base64URL encoded.
- Storing binary data in databases that only support text fields.
- Passing data in URLs — though Base64URL is preferred over standard Base64 for this.
How to Encode and Decode Base64
- Paste your text or data into the input field.
- Click Encode to convert it to a Base64 string.
- To reverse the process, paste a Base64 string and click Decode.
- Copy the output with one click — ready to use in your code or API request.
Base64 vs Base64URL — What Is the Difference?
Standard Base64 uses + and / as its 62nd and 63rd characters, which have special meanings in URLs and can cause issues when Base64 strings are passed as URL parameters. Base64URL replaces + with - and /with _, making it safe for use in URLs without percent-encoding. JWTs use Base64URL for this reason.
Knowledge Base
The Base64 Encoder/Decoder converts text to Base64 encoding and decodes Base64 back to readable text. Base64 is commonly used for encoding data in emails, URLs, and embedding binary data in JSON or XML.
- 1Enter text to encode or paste Base64 to decode.
- 2Click 'Encode' to convert text to Base64 or 'Decode' to convert Base64 to text.
- 3Copy the result to your clipboard.
All encoding and decoding is performed locally in your browser. Sensitive data like API credentials and tokens never leave your device, and the conversion is instantaneous with no server processing.
What is Base64 encoding used for?
Base64 is commonly used for encoding data in emails (MIME), embedding binary data in JSON or XML, data URLs in CSS and HTML, and encoding API credentials for HTTP Basic Auth.
Is Base64 encryption?
No, Base64 is encoding, not encryption. It converts data into a different representation but does not provide any security. Never use Base64 as a substitute for encryption.