Loading…

Hash Generator

Pick one hash type (bcrypt, MD5, SHA-1, SHA-256, SHA-384 or SHA-512), enter your text and click Generate. The result appears right below the button, ready to copy. You can add an HMAC key and set the bcrypt cost. The Verify hash tab checks whether a text matches any bcrypt, MD5 or SHA hash you already have, and detects the type for you. Hashes are calculated securely on our server, and your text is never stored or logged.

  • Free
  • No sign-up
  • Secure HTTPS processing
  • Never stored or logged

Last updated

How to use the Hash Generator

  1. Choose the hash type you need. bcrypt is selected by default.
  2. Type or paste your text, then click Generate. MD5 and SHA results also update as you type.
  3. Set the bcrypt cost, or the output format and optional HMAC key, depending on the type.
  4. Click Copy next to the result. Use the Verify hash tab to check a text against any bcrypt, MD5 or SHA hash.

Why use this tool

  • Six algorithms in one place: MD5, SHA-1, SHA-256, SHA-384, SHA-512 and bcrypt.
  • Real bcrypt, with an adjustable cost factor and a verify tool that also accepts $2a$ and $2b$ hashes.
  • Hex, UPPERCASE hex and Base64 output, plus optional HMAC.
  • Exact results: text is hashed exactly as you typed it, including spaces, and as UTF-8.
  • Secure by design: sent over HTTPS, processed in memory, never stored or logged.

What is a hash?

A hash is a short, fixed-length fingerprint of some data. A hash function reads any amount of text and produces a string of characters, such as ba7816bf8f01cfea…. The same input always gives the same hash, even a one-character change gives a completely different hash, and you cannot work out the original text from the hash.

These properties make hashes useful for checking that a file or message was not changed, for storing passwords without keeping the passwords themselves, for digital signatures, and for creating unique IDs.

Hashing is not encryption

Encryption is two-way: you lock data with a key and unlock it later with a key. Hashing is one-way: there is no key and no way back. When a website checks your password, it hashes what you typed and compares it with the stored hash. It never needs the original password, and neither does an attacker who steals the hashes, who can only try to guess.

MD5, SHA-1, SHA-256, SHA-512 or bcrypt?

The right choice depends on what you are doing. This table summarises each algorithm available here.

AlgorithmResult sizeStatus todayBest used for
MD5128 bits (32 hex characters)Broken: collisions are easy to createQuick checksums where security does not matter, such as spotting accidental changes
SHA-1160 bits (40 hex characters)Deprecated: a real collision was shown in 2017Legacy systems only
SHA-256256 bits (64 hex characters)SecureFile integrity, signatures, certificates, most general uses
SHA-384384 bits (96 hex characters)SecureWhere a longer SHA-2 digest is required
SHA-512512 bits (128 hex characters)SecureA larger security margin; often fast on 64-bit computers
bcrypt60-character string with salt and costSecure for passwordsStoring passwords

How bcrypt works

bcrypt is a password hashing function. Unlike MD5 and SHA, which are designed to be fast, bcrypt is deliberately slow, which makes guessing passwords expensive for an attacker. It has three features worth knowing:

  • Salt. bcrypt adds a random value to every hash, so the same password gives a different hash each time. The salt is stored inside the hash string, so verifying still works.
  • Cost factor. The cost sets how much work is done: each step up doubles the time. A cost of 10 or more is recommended, and Laravel uses 12 by default. Choose the highest cost your server can handle without making logins feel slow.
  • 72-byte limit. bcrypt only uses the first 72 bytes of the input. Longer passwords are cut off, so extra characters after that do not change the hash.

A bcrypt hash looks like $2y$10$…: the prefix names the version, the next number is the cost, and the rest holds the salt and the hash.

How to store passwords safely

  • Never store passwords in plain text, and never use MD5, SHA-1 or a plain SHA-256 for passwords. They are fast, so billions of guesses per second are possible.
  • Use a slow password hash: bcrypt or Argon2, through your framework’s built-in function.
  • Let the library handle the salt. Do not invent your own.
  • Re-hash a password at login when you increase the cost, so older hashes get upgraded.
  • Add rate limiting, and offer two-factor authentication, so stolen hashes and guessed passwords matter less.

What is HMAC?

HMAC (hash-based message authentication code) mixes a secret key into the hash. Only someone who knows the key can produce the same result, so it proves a message came from the right sender and was not changed. It is widely used to sign API requests and webhooks. Enter a key in the HMAC key box to get HMAC-MD5, HMAC-SHA-256 and so on. bcrypt does not use a separate key.

Checking whether a text matches a hash

A hash cannot be reversed, so checking one means hashing the text again and comparing the two results. Open the Verify hash tab, enter the text and paste the hash. The tool works out the type from the hash itself (bcrypt, MD5, SHA-1, SHA-256, SHA-384 or SHA-512, written in hex or Base64) and tells you whether they match.

For bcrypt, the salt and cost are read from the hash, so it works with hashes created by other tools and languages that use the $2a$, $2b$ or $2y$ prefix. For the other types, hex hashes are compared without regard to letter case. If the hash was made with a secret key (HMAC), enter the key too. Use this to confirm a downloaded file’s checksum text, to test a password against a database hash, or to check a signature.

How this tool works, and your privacy

Unlike most tools on this site, the Hash Generator calculates results on our server, because bcrypt cannot be done natively in a browser. Your text is sent over an encrypted HTTPS connection, hashed in memory, returned to you and then discarded. It is not saved to a database, written to a log or shared with anyone, and responses are marked so that browsers do not cache them. Requests are rate limited to protect the service.

Even so, treat any online tool with care: do not paste a real production password or secret key. Use a test value instead, or generate the hash in your own code.

Creating hashes in your own code

Every major language can do this. In PHP, use hash() for digests and password_hash() with password_verify() for passwords:

$sha256 = hash('sha256', $text);

$hash = password_hash($password, PASSWORD_BCRYPT, ['cost' => 12]);
$ok   = password_verify($password, $hash);

In Laravel, use Hash::make($password) and Hash::check($password, $hash). In Node.js, use crypto.createHash('sha256'), and in Python, hashlib.sha256(text.encode()).hexdigest(). For bcrypt, use a maintained library for your language.

Hash Generator FAQ

Your text is sent over HTTPS to our server, hashed in memory and returned. It is not stored or logged. For real production passwords or secrets we still recommend generating the hash in your own code, as with any online tool.
No. Hashing is one-way. Short or common texts can be guessed by hashing many candidates and comparing, which is why passwords need a slow hash such as bcrypt.
Use bcrypt or Argon2. Do not use MD5, SHA-1 or SHA-256 on their own for passwords, because they are fast and easy to brute force.
bcrypt adds a new random salt to each hash. The salt is stored inside the hash, so a correct password still verifies against any of them.
Not for security. Attackers can create two different inputs with the same MD5 hash. It is still fine for non-security checksums, such as detecting accidental file corruption.
Both belong to the SHA-2 family. SHA-256 gives a 256-bit result and SHA-512 a 512-bit result. Both are considered secure, and SHA-512 can be faster on 64-bit computers.
Use 10 or higher. Laravel defaults to 12. Each increase doubles the time, so pick the highest value that keeps your login fast enough for your server.
bcrypt only reads the first 72 bytes. If your input is longer, the tool warns you. Characters after byte 72 do not change the hash.
HMAC combines a hash with a secret key to prove a message is authentic and unchanged. It is commonly used to sign API requests and webhooks.
Open the Verify hash tab, enter the text, and paste the hash. The type (bcrypt, MD5, SHA-1, SHA-256, SHA-384 or SHA-512, in hex or Base64) is detected automatically, and the tool tells you whether the text produces that hash.
This tool hashes text only. Paste the text you want to hash. File hashing may be added in the future.