# bcrypt

Hash a password with bcrypt, or verify one against a hash.

## URL

https://ilham.dev/tools/bcrypt/

## What It Does

Hash a password with bcrypt, or verify a password against an existing bcrypt hash. The cost factor controls how much work each hash takes, and that expense is the whole point.

## Features

- Runs in the browser
- No login required

## Input

text input.

## Output

text output.

## Privacy

Processing happens locally in the browser.

No input data is uploaded to ilham.dev.

- Requires login: false
- Requires API key: false
- Stores user data: false


## Examples

- Which cost factor should I use?
- Why does the same password give a different hash every time?




## Questions

### Which cost factor should I use?

Test the cost on the system that will verify the passwords, and follow your application's current security policy. Higher costs take more work. **This tool does not measure or report hash duration**, so it cannot choose a cost for your server. Cost `4` in the example above is for learning only.

### Why does the same password give a different hash every time?

Because bcrypt generates a random salt per hash and stores it inside the result. That is what stops two users who chose the same password from having the same hash.

