الشبكة/HTTP
Basic Auth Generator
توليد أو فك ترميز رأس HTTP Basic Authentication — Base64(اسم المستخدم:كلمة المرور).
HTTP Basic Authentication sends a username and password in the Authorization header as Base64("username:password"). That's encoding, not encryption, so Basic Auth only makes sense on top of HTTPS.
How to use it
- Generate: enter a username and password and the tool builds the username:password string, Base64-encodes it, and produces a ready Authorization: Basic ... header.
- Decode: paste an existing Basic Auth header to decode it back into a username and password.
- Copy the finished header straight into curl, Postman, or a server config.
Common uses
- Building a header for manually testing an API with curl or Postman without running client code.
- Setting up basic authentication on nginx/Apache or in a reverse-proxy config.
- Decoding a header from logs or captured traffic while debugging an authentication issue.
Things to keep in mind
Base64 is not encryption — anyone intercepting the header instantly recovers the username and password in plain text.
Basic Auth is only safe over HTTPS — without TLS, credentials travel essentially in the clear.
مقالة عن هذه الأداة: Basic Authentication: كيف تعمل أبسط طريقة لحماية مورد HTTP
الأسئلة الشائعة
كيف يُبنى ترويسة Basic Auth فعليًا؟
يُدمج اسم المستخدم وكلمة المرور بنقطتين رأسيتين (user:password)، ثم تُرمّز السلسلة بأكملها بترميز Base64 ويُضاف لها البادئة "Basic " في ترويسة Authorization — هذا ترميز وليس تشفيرًا.
هل من الآمن استخدام Basic Auth عبر HTTP العادي؟
لا. بما أن بيانات الاعتماد مرمّزة فقط بـ Base64، يمكن لأي شخص يعترض حركة المرور فك ترميزها بسهولة — يجب استخدام Basic Auth فقط عبر HTTPS.
هل ترسل هذه الأداة اسم المستخدم أو كلمة المرور إلى أي مكان؟
لا. تُنشأ الترويسة بالكامل في متصفحك — لا شيء يُرسَل إلى خادم.
كيف "أسجّل الخروج" من موقع محمي بـ Basic Auth؟
لا توجد طريقة قياسية — يخزّن المتصفح بيانات الاعتماد مؤقتًا طالما بقي التبويب مفتوحًا. الطريقة الأكثر موثوقية هي إغلاق جميع تبويبات ذلك الموقع أو مسح بيانات الموقع من إعدادات المتصفح.
هل يمكن استخدام أحرف خاصة في اسم المستخدم أو كلمة المرور لـ Basic Auth؟
نعم، لكن وجود نقطتين رأسيتين داخل اسم المستخدم نفسه يخلق غموضًا عند فك الترميز، لذا توصي المواصفة بتجنّب النقطتين الرأسيتين في اسم المستخدم.