Free to use, no account

Bcrypt-generator

Generer en standard bcrypt-hash eller kontroller et passord mot en eksisterende bcrypt-hash. Arbeidet kjøres i en lokal nettleserarbeider, og passordet slettes etter hver kontroll.

Bcrypt bruker bare de første 72 UTF-8-bytene. Verktøyet avviser lengre verdier i stedet for å avkorte dem uten varsel. Kostnad 8–14 øker arbeidsmengden eksponentielt; høyere verdier kan ta lengre tid, særlig på telefoner. En lokal worker holder siden responsiv, men enheten din utfører beregningen.

Bruk et testpassord, ikke et ekte innloggingspassord. Resultatet er til læring og kompatibilitetskontroll; ikke bruk denne nettsiden som et produksjonssystem for lagring av kontoer.

Lim inn en standard bcrypt-hash på 60 tegn. Kontrollen støtter bcrypt-kostnader fra 4 til 14. Hashverdier med uvanlig høy kostnad avvises for å unngå ubegrenset arbeid på enheten din.

Hva gjør en bcrypt-hash?

Bcrypt er en funksjon for passordhashing, ikke kryptering. Den kombinerer en enveis hash med et tilfeldig salt og en justerbar arbeidsfaktor. En hash kan kontrolleres mot et mulig passord, men ikke dekrypteres for å finne originalen.

Veiledning

Slik bruker du bcrypt-generator

The Bcrypt Generator makes a bcrypt hash from a test password, or checks a test password against a bcrypt hash you paste in. It uses the bcryptjs library, version 3.0.3, in a background worker on your device, with a fresh random salt each time. It is a learning and compatibility aid. Please use made-up test passwords here, not the password of any real account.

Slik gjør du

  1. Type a made-up test password, or press Run safe example to fill in a sample that is marked as not a secret.
  2. Pick the hash cost (rounds) from the list. It offers 8 to 14 and starts at 10. Press Generate hash and wait for the progress bar.
  3. To check a hash, paste the 60 character bcrypt hash into the verify box, type a test password and press Verify password.
  4. Copy the new hash if you need it. The password box is cleared after every operation, and Cancel stops a slow one.

Eksempler

Hashing the built-in example password

Du skriver inn
Passord
usefulverse-demo-only-2026
Kostnad
10
Du får
Hash
$2b$10$Y7hJKSzOReh4zUoYvTURkuSnmjvXV9Fik5IOCzRqk.uuJzxpgnJXm
Lengde
60

The hash starts with $2b$ and the cost 10, followed by a 22 character salt and a 31 character hash. Your own result will differ, because a new random salt is used each time.

Kjørt med verktøyets egen kode.

Verifying the right password

Du skriver inn
Passord
usefulverse-demo-only-2026
Hash
$2b$10$Y7hJKSzOReh4zUoYvTURkuSnmjvXV9Fik5IOCzRqk.uuJzxpgnJXm
Du får
Samsvar
ja

The salt and cost are read from the hash itself, the password is hashed the same way, and the result is compared. They agree, so the tool says the password matches.

Kjørt med verktøyets egen kode.

Verifying a password that is one character off

Du skriver inn
Passord
usefulverse-demo-only-2027
Hash
$2b$10$Y7hJKSzOReh4zUoYvTURkuSnmjvXV9Fik5IOCzRqk.uuJzxpgnJXm
Du får
Samsvar
nei

A single changed character gives a completely different result, so the tool reports that the password does not match this hash.

Kjørt med verktøyets egen kode.

A password longer than 72 bytes

Du skriver inn
Hashet verdi
the letter a, 72 times
Kontrollert verdi
the letter a, 80 times
Du får
Samsvar
ja

Bcrypt uses only the first 72 bytes of a password. In a run of the same library the hash of 72 letters was matched by 80 letters. Keep test passwords well under 72 bytes.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • See what a bcrypt hash looks like and how the cost number is stored inside it.
  • Check that a hash made by another program uses a format this library can read.
  • Compare how the waiting time grows as you raise the cost.
  • Make a hash from a throwaway test password for a demo, test file or tutorial.

Begrensninger

  • The cost list offers whole numbers from 8 to 14, with 10 as the starting value. OWASP advises a minimum work factor of 10, so use 8 and 9 only for timing demos. The worker itself accepts any whole number from 4 to 31, but the page does not offer it.
  • A bcrypt hash must be written as $2a$, $2b$, $2x$ or $2y$, then a two digit cost, then 53 more characters. Anything else is called invalid.
  • Only the first 72 bytes of a password take part in the hash. The tool does not warn you when you type more.
  • When you verify, the cost stored in the pasted hash is used as written, so a hash with a very high cost can run for a very long time. Press Cancel to stop it.

Tips

  • Use made-up test passwords only, and never type the password of a real account into any web page that is not your own login.
  • Raise the cost one step at a time, since each step roughly doubles the work and phones are slower than computers.
  • OWASP advises a minimum work factor of 10 for bcrypt; use 8 and 9 only for timing demos, and your own system may ask for more.

Vanlige spørsmål

Is bcrypt the same as encryption?

No. Bcrypt is a one-way password hash. You cannot turn the hash back into the password. Software only checks a typed password by hashing it again with the same salt and cost, and comparing the two results.

What does the cost (rounds) number do?

It sets how much work the hash takes. Each increase of one roughly doubles the time, which makes guessing slower for an attacker and your own checks slower too. The value is stored inside the hash after the version marker.

Why do I get a different hash every time?

Each hash gets a new random salt, which is stored in the hash. The same password therefore gives a different string each time, and the verify step still works because it reads the salt from the hash.

Which library and format does this use?

It uses the bcryptjs library, version 3.0.3, running in a web worker. New hashes begin with $2b$ and are 60 characters long. The salt comes from the browser's secure random source.

Is my password sent anywhere?

The work is done in your browser, and the page does not send the password or hash to a server. The password field is cleared when the operation ends. Even so, use test passwords here and never a real one.

Can I use this page to store real user passwords?

No. It is a learning and checking aid, not a way to run a login system. Real systems should hash passwords on the server with a well-reviewed library and follow current security guidance, such as the OWASP cheat sheet, which prefers Argon2id for new systems and keeps bcrypt for legacy systems.

What is the 72 byte limit?

Bcrypt reads only the first 72 bytes of the password. Non-English letters can take two or more bytes each, so the limit may be hit in fewer than 72 characters. Anything after byte 72 is ignored.

Kilder

Ofte stilte spørsmål

Hva gjør en bcrypt-hash?

Bcrypt er en funksjon for passordhashing, ikke kryptering. Den kombinerer en enveis hash med et tilfeldig salt og en justerbar arbeidsfaktor. En hash kan kontrolleres mot et mulig passord, men ikke dekrypteres for å finne originalen.

Lastes passordet eller hashen opp eller lagres?

Nei. Hashing og verifisering skjer i denne nettleseren. Siden sender ikke det angitte passordet eller hashen til en server og lagrer dem ikke; passordfeltet tømmes når operasjonen er ferdig. Bruk et testpassord, ikke et ekte kontopassord.

Krypterer bcrypt passordet mitt?

Nei. Bcrypt er en enveis passordhash, ikke reversibel kryptering. Den gjør det mulig for programvare å kontrollere et mulig passord uten å lagre originalpassordet.

Hvorfor har bcrypt en grense på 72 byte?

Bcrypt-formatet behandler maksimalt 72 UTF-8-byte. Verktøyet avviser lengre inndata slik at ulike passord aldri uten varsel behandles som samme avkortede verdi.

Bør jeg lagre denne hashen for en ekte konto?

Ikke bruk denne siden som et produksjonssystem for påloggingsinformasjon. Ekte tjenester bør hashe passord på en betrodd server med vedlikeholdte autentiseringsbiblioteker, egnede parametere, hastighetsgrenser og kontobeskyttelse.