एन्कोडिंग
Base64
Base64 एन्कोडिंग और डिकोडिंग — टेक्स्ट और फ़ाइलें, सीधे ब्राउज़र में।
Base64 is a binary-to-text encoding that represents arbitrary bytes using 64 printable ASCII characters (A–Z, a–z, 0–9, plus + and /). It exists so binary data — images, archives, cryptographic keys — can pass unchanged through channels that were designed for text only.
This tool encodes and decodes both plain text and files. Everything runs client-side in your browser: the input never leaves your machine, which makes it safe for tokens, private keys, and other sensitive data.
How to use it
- Encode text: pick the Encode / Text mode, paste your string, and copy the Base64 result.
- Encode a file: switch to File mode and choose a file — you get its Base64 representation, ready for a data URI or JSON field.
- Decode: switch to Decode mode and paste a Base64 string; if it decodes to a known file type you can download the original file.
Common uses
- Embedding small images or fonts directly in CSS/HTML via data: URIs.
- Putting binary payloads inside JSON, XML, or form fields.
- Encoding credentials for the HTTP Basic Authorization header.
- Storing or transmitting PEM keys and certificates.
Things to keep in mind
Base64 is not encryption — anyone can decode it. It only changes the representation of data, not its confidentiality.
Encoded output is about 33% larger than the input because every 3 bytes become 4 characters.
For URLs and file names use Base64URL, which swaps + and / for - and _ and often drops the = padding.
इस टूल के बारे में लेख: Base64: एन्कोडिंग किस लिए है और यह कैसे काम करता है
अक्सर पूछे जाने वाले प्रश्न
Base64 एन्कोडिंग असल में करती क्या है?
यह बाइनरी डेटा (जैसे फ़ाइलें या यूनिकोड टेक्स्ट) को सिर्फ़ 64 सुरक्षित ASCII कैरेक्टर्स में बदल देती है, ताकि उसे ऐसी जगहों पर भेजा जा सके जो सिर्फ़ टेक्स्ट हैंडल करती हैं — जैसे JSON, ईमेल अटैचमेंट या URL का कुछ हिस्सा।
क्या मेरी फ़ाइल या टेक्स्ट कहीं सर्वर पर अपलोड होता है?
नहीं, यह टूल पूरी तरह आपके ब्राउज़र में चलता है — एन्कोडिंग/डिकोडिंग JavaScript से लोकली होती है, कोई डेटा सर्वर पर नहीं भेजा जाता।
Base64 एन्कोड करने से आउटपुट का साइज़ क्यों बढ़ जाता है?
हर 3 बाइट इनपुट को 4 कैरेक्टर आउटपुट में बदला जाता है, इसलिए एन्कोड किया गया डेटा मूल डेटा से लगभग 33% बड़ा हो जाता है।
स्टैंडर्ड Base64, Base64URL से कैसे अलग है?
Base64URL में + और / को - और _ से बदल दिया जाता है, ताकि स्ट्रिंग को बिना अतिरिक्त percent-encoding के URL या फ़ाइल नाम में सुरक्षित रूप से डाला जा सके। JWT इसी वेरिएंट का इस्तेमाल करता है।
स्ट्रिंग के अंत में = वर्ण का क्या मतलब है?
यह पैडिंग है, जो बताता है कि आखिरी 3-बाइट ब्लॉक में कितने बाइट्स कम हैं। यह हमेशा ज़रूरी नहीं होता — कुछ सिस्टम इसे जानबूझकर हटा देते हैं।