Sieć/HTTP
Basic Auth Generator
Wygeneruj lub zdekoduj nagłówek HTTP Basic Authentication — Base64(login:hasło).
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.
Artykuł o tym narzędziu: Basic Authentication: jak działa najprostszy sposób ochrony zasobu HTTP
Najczęstsze pytania
Jak faktycznie konstruowany jest nagłówek Basic Auth?
Nazwa użytkownika i hasło są łączone dwukropkiem (user:password), następnie cały ciąg jest kodowany w Base64 i poprzedzany prefiksem "Basic " w nagłówku Authorization — to kodowanie, nie szyfrowanie.
Czy bezpiecznie jest używać Basic Auth przez zwykłe HTTP?
Nie. Ponieważ dane uwierzytelniające są jedynie zakodowane w Base64, każdy, kto przechwyci ruch, może je trywialnie zdekodować — Basic Auth powinno być używane tylko przez HTTPS.
Czy to narzędzie wysyła moją nazwę użytkownika lub hasło gdzieś?
Nie. Nagłówek jest generowany całkowicie w Twojej przeglądarce — nic nie jest wysyłane na serwer.
Jak "wylogować się" ze strony chronionej przez Basic Auth?
Nie ma standardowego sposobu — przeglądarka buforuje dane uwierzytelniające, dopóki karta pozostaje otwarta. Najbardziej niezawodne jest zamknięcie wszystkich kart danej witryny lub wyczyszczenie danych witryny w ustawieniach przeglądarki.
Czy w loginie lub haśle Basic Auth można używać znaków specjalnych?
Tak, ale dwukropek w samym loginie powoduje niejednoznaczność przy dekodowaniu, więc specyfikacja zaleca unikanie dwukropka w nazwie użytkownika.