ネットワーク/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

Common uses

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.

このツールに関する記事: HTTP Basic認証:Authorizationヘッダーの仕組み

よくある質問

Basic Authヘッダーは実際どのように構築されますか?

ユーザー名とパスワードをコロンで結合し(user:password)、その文字列全体をBase64エンコードして、Authorizationヘッダーに「Basic 」という接頭辞を付けます — これは暗号化ではなくエンコードです。

通常のHTTPでBasic Authを使っても安全ですか?

いいえ。認証情報はBase64でエンコードされているだけなので、トラフィックを傍受した人は簡単にデコードできます — Basic AuthはHTTPS経由でのみ使用すべきです。

このツールはユーザー名やパスワードをどこかに送信しますか?

いいえ。ヘッダーはブラウザ内で完全に生成されます — サーバーには何も送信されません。

Basic Authで保護されたサイトから「ログアウト」するにはどうすればよいですか?

標準的な方法はありません — タブが開いている限り、ブラウザは認証情報をキャッシュし続けます。最も確実なのは、そのサイトのすべてのタブを閉じるか、ブラウザの設定でサイトデータを消去することです。

Basic Authのユーザー名やパスワードに特殊文字を使えますか?

はい、ただしユーザー名自体にコロンが含まれるとデコード時に曖昧さが生じるため、仕様ではユーザー名にコロンを使わないことが推奨されています。

記事: ネットワーク/HTTP