Base64 एनकोडर
अपनी एन्कोडिंग आसान बनाएं — Base64 टेक्स्ट और फ़ाइलें एनकोड और डिकोड करें।
Free online Base64 encoder. Convert text, images, files, and URLs to Base64 format instantly. Supports UTF-8, ASCII, URL-safe encoding, data URI generation, JWT decoding, encoding comparison (Base32, Hex), QR code output, and file-to-Base64 conversion.
कैसे इस्तेमाल करें
सादे टेक्स्ट के लिए Text टैब, तस्वीरों के लिए Image, किसी भी फाइल के लिए File, एक साथ कई वैल्यू के लिए Batch, या टोकन जांचने के लिए JWT Decoder चुनें।
इनपुट फील्ड में सीधे टाइप करें या टेक्स्ट पेस्ट करें, या फाइल drag-and-drop करें। टाइप करते ही टूल रियल-टाइम में Base64 में एन्कोड करता है — कोई बटन नहीं चाहिए।
वेब-फ्रेंडली आउटपुट के लिए URL-Safe encoding चालू करें (+ और / की जगह - और _ आता है), MIME या PEM के लिए लाइन ब्रेक जोड़ें, या गैर-अंग्रेज़ी टेक्स्ट के लिए कैरेक्टर एन्कोडिंग बदलें।
Raw Base64 string, पूरा data URI, HTML img tag, या CSS background-image rule copy करें। Result download करें या आसानी से share करने के लिए QR code बनाएं।
Base64 एन्कोडिंग क्या है?
Base64 is a binary-to-text encoding scheme that converts any binary data into a sequence of printable ASCII characters drawn from a 64-character alphabet: A–Z, a–z, 0–9, plus (+) and slash (/). Every 3 bytes of input become 4 Base64 characters — which means Base64 output is approximately 33% larger than the original.
Base64 क्यों इस्तेमाल करें?
- Data URIs in HTML/CSS — Embed images, fonts, and icons directly in your HTML or CSS without a separate HTTP request. Ideal for small assets in critical rendering paths.
- Email attachments (MIME) — Email protocols are text-only. Base64 is the standard method for encoding binary attachments such as PDFs, images, and ZIP files before transmission.
- HTTP Basic Authentication — Credentials are encoded as Base64 in the Authorization header:
Basic dXNlcjpwYXNz. (Note: this is not encryption — use HTTPS for security.) - JSON and XML payloads — APIs sometimes return binary data (certificates, signatures, images) encoded in Base64 inside JSON or XML fields.
- JWT tokens — JSON Web Tokens encode their header and payload as URL-safe Base64 (Base64URL), which replaces + with -, / with _, and omits padding.
URL-Safe Base64
Standard Base64 uses the characters + and / which have special meaning in URLs and file systems. URL-Safe Base64 replaces these with - and _, and optionally removes padding =. This variant is essential for JWT tokens, URL query parameters, cookie values, and filename-safe encoding.
Image और File Encoding
Upload any image to generate four ready-to-use formats instantly: the raw Base64 string, a complete data URI, an HTML <img> tag with the data URI as its src, and a CSS background-image rule. For other file types, the File tab encodes any binary file (PDF, ZIP, DOCX, EXE) to Base64 with one click.
गोपनीयता
All encoding, image processing, and file conversion happens entirely in your browser using JavaScript. Your text, files, and images never leave your device — nothing is uploaded, stored, or logged.
अक्सर पूछे जाने वाले प्रश्न
Base64 binary data को text format में बदलने की एक विधि है — इसमें 64 printable ASCII characters (A–Z, a–z, 0–9, +, /) का उपयोग होता है। इसका इस्तेमाल binary data को text-only systems जैसे email (MIME) और HTML/CSS (data URIs) के जरिए सुरक्षित रूप से भेजने के लिए किया जाता है। Input के हर 3 bytes, 4 Base64 characters बन जाते हैं।
Base64 हर 3 bytes को 4 characters में बदलता है क्योंकि यह 8 की बजाय प्रति character केवल 6 bits का उपयोग करता है। Encoded output हमेशा मूल input का 4/3 (133%) होता है। यह overhead, universal ASCII text compatibility के लिए की गई एक trade-off है।
Standard Base64 में + और / characters होते हैं जिनका URLs में खास मतलब होता है। URL-Safe Base64 इन्हें - और _ से replace करता है, और आमतौर पर padding = characters हटा देता है। इस variant का उपयोग JWT tokens, URL parameters, cookie values, और ऐसी किसी भी जगह होता है जहां encoded string को percent-encoding के बिना URL-safe होना जरूरी है।
हां। Image tab का उपयोग करके कोई भी image upload करें (JPG, PNG, GIF, SVG, WebP) और तुरंत चार copy-ready formats पाएं: raw Base64, एक data URI, एक HTML img tag, और एक CSS background-image rule। इससे आप images को सीधे HTML या CSS में embed कर सकते हैं — अलग HTTP requests की जरूरत नहीं। छोटे icons और जरूरी above-the-fold assets के लिए बहुत उपयोगी है।
यह tool UTF-8 (ज्यादातर कामों के लिए अनुशंसित — emoji और CJK characters सहित सभी Unicode को handle करता है), ASCII (7-bit, केवल English characters), ISO-8859-1 (Western European, Latin-1), और UTF-16 (wide characters, BOM सहित) को support करता है। Arabic, Chinese, या Japanese जैसे गैर-अंग्रेजी text के लिए हमेशा UTF-8 उपयोग करें।
MIME standard (RFC 2045) के अनुसार Base64 में हर 76 characters पर line break होना जरूरी है — यह email encoding में उपयोग होता है। PEM standard (RFC 7468) में प्रति लाइन 64 characters होते हैं — यह format SSL/TLS certificates, RSA keys, और अन्य cryptographic key files में इस्तेमाल होता है। Line Breaks enable करें और अपने काम के अनुसार उचित length चुनें।
नहीं। Base64 encoding है, encryption नहीं। कोई भी बिना किसी key के Base64 string को decode कर सकता है — यह बिल्कुल भी security या गोपनीयता नहीं देता। Passwords या API keys जैसे संवेदनशील data को protect करने के लिए अकेले Base64 का उपयोग कभी न करें। सुरक्षा के लिए उचित encryption (AES, RSA) का उपयोग करें और जरूरत हो तो encrypted output को transmission के लिए Base64 में encode करें।
नहीं। सारी encoding आपके browser में JavaScript के जरिए होती है। आपका text, files, और images कभी भी आपके device से बाहर नहीं जाते — कोई भी data किसी server को नहीं भेजा जाता, store या log नहीं किया जाता। आप API keys, private keys, और personal data जैसे संवेदनशील content के साथ भी इस tool का सुरक्षित रूप से उपयोग कर सकते हैं।