# Bcrypt hash

> Hash and verify passwords with bcrypt or argon2id. Nothing is stored.

Free bcrypt and argon2id generator. Hash a password in the browser, copy an htpasswd line, or verify an existing hash. The password is not sent, logged, or stored.

- Page: https://benchline.fabwaseem.com/t/htpasswd-bcrypt
- Runs: in the browser. Input stays on the device.
- Price: free, no account
- Input: A password, bcrypt or argon2id settings, an optional username, and an optional hash to verify.
- Output: A bcrypt or argon2id hash, an htpasswd line, and a match result.
- Keywords: bcrypt generator, bcrypt hash, htpasswd bcrypt, argon2 hash
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Enter a password.** Pick bcrypt or argon2id. Add a username if you want an htpasswd line.
2. **Hash or verify.** Hash creates a new string. Verify checks a hash you paste against the password.
3. **Copy the line.** The hash stays on this device. Clear the password when you are done.

## Use it from an AI agent

MCP tool name: `hash_password`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/htpasswd-bcrypt with the input as the JSON body
This call does not fetch anything. It runs on the arguments you send.

Hash a password with bcrypt or argon2id, or verify a hash. Returns an htpasswd line when a username is set. The password is not stored or logged. The page in the browser never sends the password; this call only hashes the arguments you send.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "password": {
      "type": "string",
      "description": "Password to hash or verify. It is used only for this call and is not stored."
    },
    "algorithm": {
      "default": "bcrypt",
      "type": "string",
      "enum": [
        "bcrypt",
        "argon2id"
      ]
    },
    "cost": {
      "default": 10,
      "description": "Bcrypt cost factor, from 4 to 12.",
      "type": "integer",
      "minimum": 4,
      "maximum": 12
    },
    "iterations": {
      "default": 2,
      "type": "integer",
      "minimum": 1,
      "maximum": 4
    },
    "memory": {
      "default": 8192,
      "description": "Argon2id memory in KiB.",
      "type": "integer",
      "minimum": 8,
      "maximum": 19456
    },
    "parallelism": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 2
    },
    "username": {
      "default": "",
      "description": "Optional htpasswd username. A colon is not allowed.",
      "type": "string"
    },
    "hash": {
      "description": "Existing bcrypt or argon2id hash. When set, the password is verified instead of hashed.",
      "type": "string"
    }
  },
  "required": [
    "password",
    "algorithm",
    "cost",
    "iterations",
    "memory",
    "parallelism",
    "username"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "hash_password",
    "arguments": {
      "password": "example",
      "algorithm": "bcrypt",
      "cost": 10,
      "iterations": 2,
      "memory": 8192,
      "parallelism": 1,
      "username": ""
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Does the password leave this browser?

No. Hashing runs in the page. The password is not sent to the server, logged, or stored.

### Which bcrypt prefix is this?

New hashes use the $2a$ prefix. Verification also accepts $2b$ and $2y$, which Apache httpd understands.

### Why is the cost capped?

Cost runs from 4 to 12 so a hash finishes in the page. 10 is a reasonable default. Higher costs belong on the server that stores the hash.

## Related tools

- [Password generator](https://benchline.fabwaseem.com/t/password-generator): Cryptographic passwords and passphrases, with an entropy strength meter.
- [Hash generator](https://benchline.fabwaseem.com/t/hash-generator): MD5, SHA-1, SHA-256, and SHA-512 checksums for text or a file, with HMAC.
- [Key pair](https://benchline.fabwaseem.com/t/rsa-keypair): Generate RSA, EC, and Ed25519 keys, and convert PEM and JWK.
- [JWT decoder](https://benchline.fabwaseem.com/t/jwt-decoder): Paste a JSON Web Token, read the claims, and verify the signature in the browser.
