Start typing to search tools…
🛠️ All Tools
💻 Developer Tools
📋 JSON Formatter 🌳 JSON Tree 📄 XML Formatter 🌲 XML Tree 🎨 CSS Generator 🗄️ SQL Builder ⚙️ Programming Tools 📊 ER Diagram 📐 UML Diagram 🔀 Flowchart
🌐 Network & DNS
🔍 DNS Lookup 🌍 DNS Propagation 🔎 WHOIS Lookup 🔒 SSL Checker 📡 Ping Test ⚡ Speed Test ✉️ Email Auth 👤 Username Checker
🔐 Encoding & Security
🔑 Base64 Encode 🖼️ Base64 Image 🔐 MD5 Hash 🔑 Password Gen 🎭 Fake Name Gen
🖼️ Image Tools
📦 Compressor 🔄 Converter ✂️ Cropper 📐 Resizer 🎨 Filters ✨ Effects 💧 Watermark 📸 Social Image ⭐ Favicon Maker 🖼️ Image to Text 📷 EXIF Viewer
🔍 SEO & Web
✅ SEO Checklist 🔍 SERP Preview 🗺️ Sitemap Gen 📱 Social Debugger 🏷️ Hashtag Gen
✍️ Text & Writing
📝 Word Counter ✨ Fancy Text 🎲 Random Generator 🎨 Color Palette 💡 Brainstorm Tool 🚀 SaaS Ideas 🧠 Mind Map
ℹ️ About ✉️ Contact
Home Encoding & Security Base64 Encoder / Decoder
🔐 Security ✅ 100% Free 🛡️ Client-Side Only

Base64 Encoder / Decoder

Instantly encode text or files to Base64, or decode Base64 strings back to plain text. Supports standard and URL-safe Base64. Everything runs 100% in your browser — nothing is sent to any server.

Plain Text Input 0 chars
Base64 Output 0 chars
Enter text to begin encoding or decoding.
Format:
Line wrap:
📁
Drop a file to encode it
or browse files — any format supported (images, PDFs, docs…)
📊 Encoding Stats
0
Input bytes
0
Output chars
Size ratio
0
Padding (=)
⚡ Quick Examples
Hello SGVsbG8=
Hello World SGVsbG8gV29ybGQ=
1 + 1 = 2 MSArIDEgPSAy
{"key":"val"} eyJrZXkiOiJ2YWwifQ==
💡 How it works
1️⃣
Paste or type your text in the input panel, or drop a file.
2️⃣
Instant result appears in the output panel as you type.
3️⃣
Copy or download the result with one click.
🔄
Swap to flip between encode and decode instantly.

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts arbitrary binary data into a string of 64 printable ASCII characters: A–Z, a–z, 0–9, +, and / (with = used for padding). It was designed to safely transport binary data — like images or files — through systems that only support plain text, such as email (MIME) or JSON APIs.

Every 3 bytes of input are converted into 4 Base64 characters, which means encoded output is always approximately 33% larger than the original input. Decoding reverses this process exactly, recovering the original bytes without any loss.

Common Use Cases

📧
Email Attachments (MIME)
Email protocols are text-only. Base64 encodes binary attachments like images and PDFs so they can travel safely through mail servers.
🌐
Data URIs in HTML/CSS
Embed images or fonts directly into HTML or CSS files as data:image/png;base64,… to eliminate extra HTTP requests.
🔑
JWT Tokens
JSON Web Tokens use URL-safe Base64 to encode their header and payload so they can be safely passed in URLs and HTTP headers.
🔌
API & JSON Payloads
APIs that exchange JSON often Base64-encode binary blobs — like file uploads or cryptographic keys — to keep payloads as valid JSON strings.

Standard vs URL-Safe Base64

Standard Base64 uses + and / as its 62nd and 63rd characters. These are special characters in URLs, so URL-safe Base64 replaces them with - and _ respectively. The padding character = is also sometimes omitted in URL-safe variants. Use URL-safe when encoding data for JWTs, OAuth tokens, or anything embedded in a URL query string.

Frequently Asked Questions

No. Base64 is purely an encoding scheme — it is completely reversible by anyone and provides zero security or confidentiality. Do not use it to hide sensitive data. If you need to protect data, use proper encryption like AES-256.
Base64 encodes 3 input bytes into 4 output characters. If the input isn't a multiple of 3 bytes, padding characters (=) are added to make the output length a multiple of 4. One = means 1 byte of padding; == means 2 bytes of padding.
Yes — use the file drop zone below the text panels. The file is read locally using the FileReader API and encoded entirely in your browser. No file data is ever uploaded to a server. The resulting Base64 string can be used as a data URI directly in HTML or CSS.
Base64 encoded data is always exactly 4/3 the size of the input — approximately 33% larger. For example, a 300 KB image encodes to roughly 400 KB of Base64 text. This is worth considering when embedding large files as data URIs.
Yes. The tool first converts your input to UTF-8 bytes (handling multi-byte characters and emoji correctly), then encodes those bytes to Base64. Decoding reverses this — from Base64 back to UTF-8 bytes, then to the original Unicode string.
Copied to clipboard!