Base64 Encoder / Decoder
Instantly encode or decode Base64 text — all processing happens in your browser.
Input
Output
🖼 Image preview:
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is commonly used to:
- Embed binary files (images, PDFs) in HTML or CSS
- Encode data in URLs and cookies
- Transmit data over text-only protocols (e.g., email via MIME)
- Store complex data in JSON or XML
How to use
- Type or paste your text in the Input box, then click 🔒 Encode or 🔓 Decode.
- Use ⇄ Swap to push the output back into the input for chained operations.
- Enable URL-safe mode to produce output safe for URLs and JWT tokens (
+→-,/→_). - Click 📎 Encode file… to upload any file and get its Base64 Data URL (e.g. for embedding images in HTML/CSS).
- When the decoded result is an image Data URL, a live preview is shown automatically.