Server Security

.htpasswd Generator

Generate .htpasswd entries for Apache and Nginx basic auth — bcrypt, MD5-APR, SHA1. Client-side only, your password never leaves the browser.

서버 보안

.htpasswd 생성기

Apache·Nginx 기본 인증용 .htpasswd 항목 생성 — bcrypt, MD5-APR, SHA1. 브라우저에서만 처리되며 비밀번호는 서버로 전송되지 않습니다.

Plain text passwords are extremely insecure. Anyone who can read your .htpasswd file will see passwords in clear text. Use bcrypt instead. 평문 비밀번호는 매우 위험합니다. .htpasswd 파일을 읽을 수 있는 누구나 비밀번호를 볼 수 있습니다. bcrypt를 사용하세요.
.htpasswd output

Your generated entries will appear here. 생성된 항목이 여기에 표시됩니다.

Tip: You can append multiple entries to a single .htpasswd file — one username:hash per line. Use "Add another user" to generate multiple entries at once and copy them all together.
팁: 하나의 .htpasswd 파일에 여러 항목을 추가할 수 있습니다 — 한 줄에 사용자명:해시 형식으로 작성하세요. "사용자 추가"를 눌러 여러 항목을 한 번에 생성하고 복사할 수 있습니다.

How to use

Step 1

Choose a hash format

Select bcrypt for maximum security. Use MD5-APR if your server only supports older Apache formats. SHA1 is legacy and not recommended for new setups.

Step 2

Enter credentials

Type a username and password. Add more users with the "Add another user" button — all entries will be generated at once.

Step 3

Generate & copy

Click "Generate" and copy the output. Each line is a ready-to-use .htpasswd entry in username:hash format.

Step 4

Deploy to your server

Save the output to a file named .htpasswd and reference it in your Apache or Nginx config. Keep this file outside the web root.

사용 방법

Step 1

해시 형식 선택

최고의 보안을 위해 bcrypt를 선택하세요. 구버전 Apache 형식만 지원하는 서버라면 MD5-APR을 사용하세요. SHA1은 레거시 형식으로 새 설정에는 권장하지 않습니다.

Step 2

자격증명 입력

사용자명과 비밀번호를 입력하세요. "사용자 추가" 버튼으로 여러 사용자를 추가하면 한 번에 모든 항목을 생성할 수 있습니다.

Step 3

생성 및 복사

생성 버튼을 클릭하고 결과를 복사하세요. 각 줄은 사용자명:해시 형식의 .htpasswd 항목입니다.

Step 4

서버에 배포

출력 내용을 .htpasswd 파일로 저장하고 Apache 또는 Nginx 설정에서 참조하세요. 이 파일은 웹 루트 외부에 보관하세요.

Frequently asked questions

An .htpasswd file is a flat text file that stores username and hashed password pairs, one per line. Apache and Nginx use it to enforce HTTP Basic Authentication — prompting visitors for a username and password before serving protected content.
bcrypt is the best choice for new setups. It's slow by design (making brute-force attacks impractical) and is supported by Apache 2.4+ and Nginx via the auth_basic module with a bcrypt-capable PAM backend. MD5-APR ($apr1$) is widely supported but weaker. SHA1 is legacy and should be avoided on new deployments. Plain text is never acceptable in production.
Yes. bcrypt at cost factor 10 requires roughly 100ms per hash check, making automated credential-stuffing attacks extremely slow. Apache 2.4+ supports bcrypt natively via AuthType Basic + AuthUserFile. Note: Nginx does not natively verify bcrypt hashes — you need a bcrypt-capable PAM module or a reverse-proxy auth solution.
Add these directives to your Nginx server or location block:

auth_basic "Protected Area";
auth_basic_user_file /etc/nginx/.htpasswd;


Nginx supports MD5-APR and SHA1 natively. For bcrypt support, install the libnginx-mod-http-auth-pam package and configure PAM.
No. This tool runs entirely in your browser. All hashing is performed client-side using JavaScript — bcrypt via the bcryptjs library, SHA1 via the Web Crypto API, and MD5-APR via a self-contained pure-JS implementation. No data is transmitted anywhere.

자주 묻는 질문

.htpasswd 파일은 사용자명과 해시된 비밀번호 쌍을 한 줄씩 저장하는 텍스트 파일입니다. Apache와 Nginx는 이 파일을 사용해 HTTP 기본 인증(Basic Auth)을 적용하며, 보호된 콘텐츠에 접근하기 전에 방문자에게 사용자명과 비밀번호를 요구합니다.
새 설정에는 bcrypt가 가장 좋은 선택입니다. 설계상 느리게 동작해 무차별 대입 공격을 실용적으로 불가능하게 만들며, Apache 2.4+와 Nginx(bcrypt 지원 PAM 백엔드)에서 지원됩니다. MD5-APR($apr1$)은 광범위하게 지원되지만 보안이 약합니다. SHA1은 레거시 형식으로 새 환경에는 피하세요. 평문은 프로덕션에서 절대 사용하면 안 됩니다.
네. 비용 인자(cost factor) 10의 bcrypt는 해시 검증에 약 100ms가 소요되어 자동화된 크리덴셜 스터핑 공격을 극도로 느리게 만듭니다. Apache 2.4+는 AuthType Basic + AuthUserFile 조합으로 bcrypt를 기본 지원합니다. 단, Nginx는 기본적으로 bcrypt 해시를 검증하지 않으므로 bcrypt 지원 PAM 모듈이나 리버스 프록시 인증 솔루션이 필요합니다.
Nginx server 또는 location 블록에 다음 지시어를 추가하세요:

auth_basic "Protected Area";
auth_basic_user_file /etc/nginx/.htpasswd;


Nginx는 MD5-APR과 SHA1을 기본 지원합니다. bcrypt 지원이 필요하면 libnginx-mod-http-auth-pam 패키지를 설치하고 PAM을 설정하세요.
아닙니다. 이 도구는 완전히 브라우저 내에서 실행됩니다. 모든 해싱은 JavaScript를 통해 클라이언트 측에서 처리됩니다 — bcrypt는 bcryptjs 라이브러리, SHA1은 Web Crypto API, MD5-APR은 순수 JS 구현을 사용합니다. 어떠한 데이터도 전송되지 않습니다.