🔢 Base64 Encoder & Decoder

Encode text or files to Base64 (or Base32, Hex, Binary, ASCII85) and decode Base64 back to text, image, PDF, audio or video with live preview. URL-safe mode, a validator, Data URI snippets, batch ZIP and export. 100% local — nothing is uploaded.

📤 Result
Chars: 0 Bytes: 0 Ratio: Time:
🧩 Generated Code Snippets

Ctrl+Enter Encode Ctrl+Shift+Enter Decode Ctrl+L Clear all
🕒 History (last 10, local)

No history yet. Encode or decode something to see it here.

🔒 Private by design: all encoding and decoding happens in your browser. Your text and files are never uploaded to a server, and the tool works offline once loaded.

✨ Key Features

🔤 Text & File Encoding

Encode typed text or any file to Base64 — and to Base32, Hex, Binary, Octal, Decimal or ASCII85.

🖼️ Decode with Preview

Decode Base64 back to text or a file, with automatic image, PDF, audio and video preview.

🔗 URL-safe Base64

Switch to the URL-safe alphabet used in JWTs, OAuth and query strings, with padding handled.

✅ Validator & Repair

Detect invalid characters, fix missing padding and normalise a Base64 string in one click.

🧩 Data URI & Snippets

Generate a Data URI plus ready HTML <img>, CSS background and JSON snippets.

🔎 Smart Detection

Sniffs magic bytes to identify PNG, JPEG, GIF, WebP, PDF, MP3, WAV, MP4, ZIP, JSON and HTML.

📦 Batch ZIP

Drop many files, encode them all and download the Base64 results as a single ZIP.

📊 Live Stats

Character and byte counts, size ratio and processing time for every conversion.

📤 Copy & Export

Copy the result or a snippet, or export as TXT, JSON or CSV.

🕒 History

Your last 10 conversions are kept locally for quick restore — never sent anywhere.

🔒 100% Local

Everything runs in your browser. Nothing is uploaded, logged or tracked.

♿ Accessible & Mobile

Keyboard shortcuts, ARIA labels, high-contrast support and a responsive layout.

🎯 Benefits

🧰 Related Tools

ℹ️ About This Tool

The ApneSoftware Base64 Encoder & Decoder is a professional, privacy-first utility for converting data between binary and text, entirely inside your browser. Base64 is a binary-to-text encoding scheme that represents arbitrary binary data using 64 printable ASCII characters — the letters A–Z and a–z, the digits 0–9, and the symbols + and /. Every three bytes of input become four Base64 characters, so the encoded output is roughly 33% larger than the original. Crucially, Base64 is encoding, not encryption: it adds no security whatsoever, because anyone can decode it without a key. Its job is simply to let binary data travel safely through channels that were designed for text — email, HTTP headers, JSON, HTML and CSS — without the raw bytes being corrupted along the way.

That single idea powers an enormous amount of everyday software. When an image is embedded directly inside an HTML email instead of linked from a server, it is stored as Base64 in the message source. When a front-end developer inlines a small icon or font in a stylesheet using url(data:image/png;base64,…), they are using a Base64 Data URI to avoid an extra network request. When an app authenticates with HTTP Basic Auth, the username and password are Base64-encoded in the Authorization header. And when you inspect a JSON Web Token (JWT), its header and payload are Base64url — a URL-safe variant. This tool gives you a complete workbench for all of these: encode text or files, decode strings back to text or downloadable files, preview what a Base64 blob actually contains, and generate the exact snippets you need to use it.

In encode mode you can type or paste text, or drag in one or more files of any type. Beyond standard Base64 you can output the same bytes as Base32, hexadecimal, binary, octal, decimal or ASCII85, which is invaluable when a protocol or debugger expects a particular representation. A URL-safe option swaps + and / for - and _ and drops padding, exactly as JWTs and OAuth flows require. Convenience options let you encode live as you type or strip whitespace from the input first. For files, an information panel shows the name, size, MIME type and last-modified date, a progress bar tracks larger files, and a batch mode encodes a whole set of files and packages the results into a single downloadable ZIP.

In decode mode you paste a Base64 string — with or without a data: prefix — and the tool converts it back. Its Smart Detection engine reads the leading bytes to identify the content: image formats (PNG, JPEG, GIF, WebP, SVG), PDFs, audio (MP3, WAV, OGG), video (MP4, WebM), ZIP archives, JSON, HTML and plain text. When it recognises media, a live preview appears right in the page — images render, PDFs open in an embedded viewer, and audio and video play inline — so you can confirm a blob is what you expect before downloading it as a properly-named file. A dedicated validator checks a string for invalid characters, repairs missing = padding and normalises URL-safe input, turning a common source of "invalid Base64" errors into a one-click fix.

Because results are meant to be used, the tool makes them easy to take away. Every conversion reports live statistics — character count, byte count, size ratio and processing time — and the output can be copied, downloaded as TXT, or exported as JSON or CSV. For images and PDFs it also builds ready-to-paste Data URI, HTML <img>, CSS background and JSON snippets. A local history keeps your last ten conversions so you can restore or re-copy them quickly, and the whole interface supports keyboard shortcuts (Ctrl+Enter to encode, Ctrl+Shift+Enter to decode, Ctrl+L to clear) along with a light and dark appearance.

Privacy is the reason this runs in the browser. Many "online Base64" sites work by uploading your file to a server that does the conversion — which is exactly what you do not want when the data is a private key, a confidential document or an internal API response. This tool never uploads anything. Your text and files are read into memory, converted locally with JavaScript, and never transmitted; there is no account, no logging and no analytics on your content, and nothing is stored beyond the optional local history you can clear at any time. Because all processing is local, it also keeps working offline once loaded, and it follows accessibility best practices with keyboard navigation, ARIA labelling, visible focus outlines and high-contrast support. In short, it is a fast, complete, genuinely private Base64 workbench for developers, testers and anyone who needs to move data between binary and text with confidence.

ℹ️ इस टूल के बारे में

ApneSoftware Base64 Encoder & Decoder data को binary व text के बीच बदलने के लिए एक professional, privacy-first उपयोगिता है जो पूरी तरह आपके browser के अंदर चलती है। Base64 एक binary-to-text encoding है जो किसी भी binary data को 64 printable ASCII characters से दर्शाती है — A–Z, a–z, अंक 0–9, और चिह्न +/। हर तीन bytes चार Base64 characters बनते हैं, इसलिए encoded output मूल से लगभग 33% बड़ा होता है। महत्वपूर्ण बात — Base64 encoding है, encryption नहीं: यह कोई security नहीं देती, क्योंकि कोई भी इसे बिना key के decode कर सकता है। इसका काम केवल binary data को उन माध्यमों से सुरक्षित ले जाना है जो text के लिए बने हैं — email, HTTP headers, JSON, HTML व CSS।

यही एक विचार रोज़मर्रा के बहुत सारे software को शक्ति देता है। जब कोई image HTML email के अंदर सीधे embed होती है, वह source में Base64 के रूप में होती है। जब कोई front-end developer stylesheet में एक छोटा icon या font url(data:image/png;base64,…) से inline करता है, वह एक अतिरिक्त network request बचाने के लिए Base64 Data URI उपयोग कर रहा होता है। जब कोई app HTTP Basic Auth से authenticate करता है, username व password Authorization header में Base64-encoded होते हैं। और जब आप एक JWT देखते हैं, उसका header व payload Base64url — एक URL-safe variant — होता है। यह टूल इन सबके लिए एक पूर्ण workbench देता है।

encode mode में आप text टाइप या paste कर सकते हैं, या किसी भी प्रकार की एक-या-अनेक files drag कर सकते हैं। standard Base64 के अलावा आप उन्हीं bytes को Base32, hexadecimal, binary, octal, decimal या ASCII85 के रूप में output कर सकते हैं, जो तब बहुत उपयोगी है जब कोई protocol या debugger कोई विशेष रूप चाहता है। एक URL-safe विकल्प +/ को -_ से बदलता है और padding हटाता है, ठीक जैसा JWTs व OAuth चाहते हैं। सुविधा विकल्प आपको टाइप करते ही live encode करने या पहले whitespace हटाने देते हैं। files के लिए एक information panel नाम, size, MIME type व last-modified तारीख दिखाता है, एक progress bar बड़ी files को ट्रैक करता है, और एक batch mode पूरे सेट को encode कर परिणाम एक ही ZIP में पैक करता है।

decode mode में आप एक Base64 string paste करते हैं — data: prefix के साथ या बिना — और टूल उसे वापस बदल देता है। इसका Smart Detection engine शुरुआती bytes पढ़कर content पहचानता है: image formats (PNG, JPEG, GIF, WebP, SVG), PDFs, audio (MP3, WAV, OGG), video (MP4, WebM), ZIP, JSON, HTML व plain text। जब यह media पहचानता है, page में ही एक live preview दिखता है — images render होते हैं, PDFs embedded viewer में खुलते हैं, और audio व video inline चलते हैं — ताकि download से पहले आप पुष्टि कर सकें। एक समर्पित validator string में अमान्य characters जाँचता है, गायब = padding ठीक करता है और URL-safe input को normalise करता है।

चूँकि परिणाम उपयोग के लिए हैं, टूल उन्हें आसानी से ले जाने योग्य बनाता है। हर conversion live statistics बताता है — character count, byte count, size ratio व processing time — और output को copy, TXT में download, या JSONCSV में export किया जा सकता है। images व PDFs के लिए यह तैयार Data URI, HTML <img>, CSS background व JSON snippets भी बनाता है। एक local history आपकी अंतिम दस conversions रखती है, और पूरा interface keyboard shortcuts (Ctrl+Enter encode, Ctrl+Shift+Enter decode, Ctrl+L clear) व light/dark रूप समर्थित करता है।

यह सब browser में चलने का कारण privacy है। कई "online Base64" sites आपकी file एक server पर upload करके conversion करती हैं — जो तब बिल्कुल नहीं चाहिए जब data एक private key, गोपनीय दस्तावेज़ या आंतरिक API response हो। यह टूल कभी कुछ upload नहीं करता। आपका text व files memory में पढ़े जाते हैं, JavaScript से locally बदले जाते हैं, और कहीं transmit नहीं होते; कोई account नहीं, कोई logging नहीं, आपकी सामग्री पर कोई analytics नहीं, और वैकल्पिक local history के अलावा कुछ store नहीं होता जिसे आप कभी भी साफ़ कर सकते हैं। सब कुछ local होने के कारण यह load होने के बाद offline काम करता है, और keyboard navigation, ARIA labelling व high-contrast समर्थन के साथ accessibility सर्वोत्तम प्रथाओं का पालन करता है।

🔡 Encoding Formats

FormatAlphabet / formTypical use
Base64A–Z a–z 0–9 + /The standard for embedding binary in text (email, JSON, HTML).
Base64 URL-safeA–Z a–z 0–9 - _JWTs, OAuth, URL parameters and file names.
Base32A–Z 2–7Case-insensitive IDs, TOTP secrets and DNS-safe data.
Hex (Base16)0–9 a–fHashes, colours, byte dumps and debugging.
Binary8-bit groupsTeaching, bit-level inspection and low-level protocols.
Octalbase-8 per byteLegacy Unix permissions and escape sequences.
Decimal0–255 per byteByte-value inspection and quick maths.
ASCII8585-character setPostScript/PDF; ~25% overhead vs Base64's ~33%.

✅ Validation Guide

  1. Paste your Base64 into the Decode box and click Validate / Repair.
  2. The tool flags any invalid characters (anything outside the Base64 alphabet).
  3. It restores missing = padding so the length is a multiple of four.
  4. If the string uses - and _, it normalises the URL-safe alphabet back to standard.
  5. A green message means it's valid and ready to decode; a red one explains exactly what's wrong.

🔒 Privacy & Security

English: All encoding and decoding happens entirely in your browser with JavaScript. Your text and files are never uploaded to a server, there is no account, and nothing is tracked. The only data stored is an optional local history you can clear anytime, and the tool works offline once loaded — so even a private key or confidential file never leaves your device. Remember Base64 is encoding, not encryption; don't rely on it for security.
हिन्दी: सारी encoding व decoding पूरी तरह आपके browser में JavaScript से होती है। आपका text व files किसी server पर upload नहीं होतीं, कोई account नहीं, और कुछ भी track नहीं होता। केवल एक वैकल्पिक local history store होती है जिसे आप कभी भी साफ़ कर सकते हैं, और page load के बाद टूल offline काम करता है — इसलिए private key या गोपनीय file भी कभी device से बाहर नहीं जाती। याद रखें Base64 encoding है, encryption नहीं; security के लिए इस पर निर्भर न रहें।

🚀 How To Use

  1. Pick Encode or Decode.
  2. To encode: choose Text or File, enter your input, pick a format, and click Encode.
  3. To decode: paste a Base64 string and click Decode as Text or Decode & Download File.
  4. Use Smart Detection to preview images, PDFs, audio and video before saving.
  5. Copy, download, grab a Data URI snippet, or export as TXT/JSON/CSV.

❓ Frequently Asked Questions

🛠️ Troubleshooting