Base64 Basic Auth Header एन्कोडर/डिकोडर

तेज़ी से Basic Auth credential string बनाएँ या जाँचें, फिर सीधे live Base64 tool में जाएँ।

इस पेज का उपयोग तब करें जब आपको username:password एन्कोड करना हो, मौजूदा header से Basic prefix हटाना हो, या समझाना हो कि Base64 encryption नहीं है।

इसे तब उपयोग करें जब
कोई request इसलिए विफल हो रही हो क्योंकि Basic Auth header गलत तरीके से copy किया गया था या गलत payload से बनाया गया था।
पहले क्या जाँचें
पुष्टि करें कि credential pair username:password है, फिर डिकोड करने से पहले जाँचें कि header में अभी भी Basic prefix है या नहीं।
सामान्य गलती
Base64 representation बदलता है, secrecy नहीं। डिकोड की गई credential string को plain text की तरह समझें।
उदाहरण वर्कफ़्लो
raw credential pair एन्कोड करें
plain username:password मान से शुरू करें, फिर केवल उसी payload को एन्कोड करें।
aladdin:opensesame
YWxhZGRpbjpvcGVuc2VzYW1l
Authorization header डिकोड करें
डिकोड करने से पहले header prefix हटाएँ ताकि payload Base64 segment से शुरू हो।
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
curl shortcut से मिलान करें
curl -u आपके लिए वही header बनाता है, जो तेज़ sanity checks के लिए उपयोगी है।
curl -u "aladdin:opensesame" https://api.example.com/me
Unicode credentials जाँचें
live tool UTF-8 text स्वीकार करता है, इसलिए non-ASCII credentials round-trip में सुरक्षित रहते हैं।
naive:pässwörd
Basic Auth headers कैसे काम करते हैं

Basic Auth header में Basic शब्द, एक space और Base64-encoded credential pair होता है। server उसे जाँचने से पहले फिर से plain text में डिकोड करते हैं।

  • सिर्फ raw credential pair को एन्कोड करें, Authorization header name को नहीं।
  • मौजूदा header डिकोड करते समय पहले Basic prefix हटाएँ।
Base64 encryption नहीं है

जो भी header पढ़ सकता है, वह credential pair डिकोड कर सकता है। HTTPS और सही secret handling का उपयोग करें क्योंकि Base64 सिर्फ transport representation बदलता है।

  • जब reversible encoding की जगह one-way fingerprints चाहिए हों, तो Hash Generator का उपयोग करें।