Esta página aún no está traducida al español, así que la mostramos en inglés.

.htpasswd Generator

Generate user:hash lines for HTTP Basic Authentication in Apache, Nginx, Traefik and Caddy — with bcrypt by default and nothing sent to a server.

Actualizado el

🔒 Runs locally with your browser’s Web Crypto API — nothing you type is sent to a server.

Tus datos nunca salen de tu ordenador. Todo se procesa localmente en tu navegador.

Cómo usar: Htpasswd Generator

  1. Enter a username and password (or generate a strong password).
  2. Keep bcrypt unless your server is very old.
  3. Click Add user; repeat for more users.
  4. Copy the lines into your .htpasswd file or download it.

What is an .htpasswd file?

An .htpasswd file stores usernames and password hashes for HTTP Basic Authentication — the browser login prompt used to protect staging sites, admin areas and internal tools. Each line is username:hash.

Algorithms

FormatPrefixSecuritySupported by
bcrypt$2y$Strong, salted, slowApache 2.4+, Nginx (via system crypt on most Linux), Traefik, Caddy
APR1-MD5$apr1$Salted but fast — weak by today’s standardsApache, Nginx everywhere
SHA1{SHA}Unsalted — avoidApache, Nginx

Using the file

Apache (.htaccess or vhost):

AuthType Basic
AuthName "Restricted"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user

Nginx:

location /admin/ {
    auth_basic "Restricted";
    auth_basic_user_file /etc/nginx/.htpasswd;
}

Keep the file outside the web root and readable only by the server (for example chmod 640). Basic Auth sends the password with every request, so only use it over HTTPS.

Nginx may not accept bcrypt on systems where its crypt() lacks support (some Alpine images); use APR1 there. Generate single bcrypt hashes with the bcrypt generator.

También se busca como: htpasswd online, nginx basic auth password, apache htpasswd, generate htpasswd, traefik basic auth.

Herramientas que combinan con: Htpasswd Generator

  • Generador de contraseñas — Crea contraseñas seguras y verdaderamente aleatorias o frases de contraseña fáciles de escribir, con reglas avanzadas: incluye o excluye palabras, exige determinados caracteres, elige los símbolos permitidos, evita repeticiones y secuencias.
  • Generador de configuraciones de Nginx — Elige qué quieres que haga Nginx —servir una página web estática o una SPA, actuar como proxy para una aplicación de Node/Python o ejecutar PHP— y marca las opciones adicionales.
  • Calculadora de chmod — Marca las casillas «Leer», «Escribir» y «Ejecutar» para el propietario, el grupo y los demás, o escribe 755, rwxr-xr-x o u=rwx,g=rx,o=rx.
  • Hash Generator — Compute MD5 and SHA hashes of any text or file instantly, create HMAC signatures, and paste an expected checksum to verify a download.

Preguntas frecuentes

Does Nginx support bcrypt in .htpasswd?
Yes on most Linux distributions, because Nginx uses the system crypt() function. On systems without bcrypt support (for example some Alpine images), use APR1-MD5.
Is the password sent to your server?
No. Hashes are computed in your browser; nothing is transmitted or stored.
How do I add a user to an existing file?
Generate the line here and append it to the file on a new line. Adding the same username again replaces the old line in the box above.
Why is every bcrypt line different?
Each hash has a random salt. Different hashes for the same password all work.
¿Puedo instalar Htpasswd Generator como aplicación web y utilizarla sin conexión?
Sí. Htpasswd Generator es una aplicación web instalable (PWA): se instala desde el navegador, no se descarga desde una tienda de aplicaciones. Haz clic en «Instalar aplicación» en la parte superior de esta página en Chrome o Edge (Windows, macOS, Linux, ChromeOS) o, en Android, utiliza «Compartir» → «Añadir a la pantalla de inicio» en iPhone y iPad, o «Archivo» → «Añadir al Dock» en Safari 17+ en un Mac. A continuación, se abrirá en su propia ventana con su propio icono y, como se ejecuta íntegramente en tu navegador, seguirá funcionando sin conexión. Firefox en el ordenador de sobremesa no permite instalar aplicaciones web. Cómo funciona la instalación.

Herramientas relacionadas