Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 strings — instantly, client-side, 100% private.
How to Use
Select Encode to convert plain text into a Base64 string, or Decode to reverse the process. Toggle URL-safe to use - and _ instead of + and /, which is required for Base64 used in URLs and JWT tokens.
- Paste or type your input text in the box above.
- Choose Encode or Decode mode.
- Click Convert — the result appears instantly.
- Hit Copy to copy the output to your clipboard.
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is commonly used to embed binary data (images, files) in text formats such as HTML, CSS, XML, JSON, and email.
Common Use Cases
- Encoding binary files for embedding in HTML/CSS (
data:URIs) - Transmitting data in HTTP headers or query strings
- Encoding credentials in HTTP Basic Authentication
- Storing or transmitting JSON Web Tokens (JWT)
- Encoding email attachments (MIME)
URL-safe Base64
Standard Base64 uses + and / which are special characters in URLs. URL-safe Base64 replaces these with - and _ respectively, making the encoded string safe for use in URLs without percent-encoding.
Frequently Asked Questions
=) are added to make the output length a multiple of 4. One = means 1 padding byte was needed; two == means 2.