ネットワーク/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 Authヘッダーは実際どのように構築されますか?
ユーザー名とパスワードをコロンで結合し(user:password)、その文字列全体をBase64エンコードして、Authorizationヘッダーに「Basic 」という接頭辞を付けます — これは暗号化ではなくエンコードです。
通常のHTTPでBasic Authを使っても安全ですか?
いいえ。認証情報はBase64でエンコードされているだけなので、トラフィックを傍受した人は簡単にデコードできます — Basic AuthはHTTPS経由でのみ使用すべきです。
このツールはユーザー名やパスワードをどこかに送信しますか?
いいえ。ヘッダーはブラウザ内で完全に生成されます — サーバーには何も送信されません。
Basic Authで保護されたサイトから「ログアウト」するにはどうすればよいですか?
標準的な方法はありません — タブが開いている限り、ブラウザは認証情報をキャッシュし続けます。最も確実なのは、そのサイトのすべてのタブを閉じるか、ブラウザの設定でサイトデータを消去することです。
Basic Authのユーザー名やパスワードに特殊文字を使えますか?
はい、ただしユーザー名自体にコロンが含まれるとデコード時に曖昧さが生じるため、仕様ではユーザー名にコロンを使わないことが推奨されています。