A worked example, rendered from real sample data. Sign in to run the tool on your own input.
correct horse battery staple═══ What this tool does ═══
ℹ It runs REAL bcrypt (the bcryptjs library) on our server, times it, and uses that measurement to plan a cost factor. Nothing is faked.
ℹ Costs 13 and above are extrapolated by doubling, because each step costs twice as much and measuring cost 15 would hold the request open for half a minute.
ℹ bcryptjs is pure JavaScript. A native bcrypt on the same machine is typically two to four times faster, so read the SHAPE of the curve, then calibrate on your own hardware.
ℹ To hash or verify a specific password, use the Bcrypt Hash Tester instead. This tool is for choosing the cost.
═══ Measurement ═══
Password length: 28 characters
Cost 8: 45 ms measured (256 key-setup rounds)
Cost 9: 71 ms measured (512 key-setup rounds)
Cost 10: 336 ms measured (1,024 key-setup rounds)
Cost 11: 861 ms measured (2,048 key-setup rounds)
Cost 12: 1.7 s measured (4,096 key-setup rounds)
Anchor: cost 12 at 1.7 s
═══ Cost table (target 250 ms per login) ═══
cost hash time logins/s GPU guesses/s crack a 40-bit secret
-----------------------------------------------------------------------
8 45 ms 88 23000 277 d (measured)
9 71 ms 56 11500 1.5 y (measured)
10 336 ms 12 5750 3.0 y (measured)
11 861 ms 4.6 2875 6.1 y (measured)
12 1.7 s 2.4 1438 12.1 y (measured)
13 3.4 s 1.2 719 24.2 y
14 6.8 s 0.6 359 48.5 y
1
…
Time real bcrypt on the server and pick the highest cost factor your login budget allows. Part of the DevTools Surf developer suite. Browse more tools in the Security / Crypto collection.