Base64 Encoder/Decoder — Free Online Tool
Encode and decode Base64 strings
All processing happens locally. No data is sent to any server.
Base64 is a binary-to-text encoding scheme that represents binary data as ASCII text. Our Base64 Encoder/Decoder makes it easy to convert between text and Base64 format. Switch between encode and decode mode with the toggle. Enable URL-safe mode to use characters safe for URLs and filenames (replacing + with - and / with _). You can also upload a file to convert it to its Base64 representation — useful for embedding images in HTML/CSS or transmitting binary data over text-based protocols like email or JSON APIs. The tool processes everything in your browser using the Web Crypto API, ensuring fast and secure encoding. Whether you're encoding credentials for HTTP Basic Auth, embedding data in data URIs, decoding API responses, preparing binary data for email transmission, or converting binary files for embedding in JSON, this tool handles it all. The real-time preview shows you the result as you type, and you can copy the output with a single click for immediate use. All processing happens in your browser — your data never leaves your device. This makes it safe to use with sensitive credentials, API keys, or confidential binary data. For related encoding tasks, try our [URL Encoder/Decoder](/tools/url-encoder) for percent-encoding, or decode [JWT tokens](/tools/jwt-decoder) which use Base64URL encoding internally.
FAQ
What is Base64?
Base64 is an encoding scheme that represents binary data as ASCII text. It's commonly used for embedding images in HTML/CSS, encoding credentials in HTTP headers, and data transmission.
What is URL-safe Base64?
URL-safe Base64 replaces + with - and / with _ to make the encoded string safe for use in URLs and filenames.
Is my data safe?
Yes. All encoding/decoding happens in your browser. Your data never leaves your device.