Skip to content

Hash Generator

Hash text or a file with MD5, SHA-1, SHA-256 or SHA-512, and compare it with an expected checksum. Create and check bcrypt password hashes.

SHA-256 · no hash yet

The hash appears here.

Algorithm

Choose a file or drop one anywhere in this box. Files up to 256 MB are hashed in your browser and not uploaded.

01 · Definition

What is a hash?

A hash function turns any input, from one character to a multi-gigabyte file, into a fixed-length value called a digest. The same input always gives the same digest, a one-bit change gives a completely different one, and the input cannot be recovered from it. Hashes are used for checksums, signatures, deduplication and password storage.

02 · Overview

How the Hash Generator works

Type or paste text, or choose or drop a file of up to 256 MB, and get its MD5, SHA-1, SHA-256 or SHA-512 digest as lowercase hex. Paste the checksum a publisher lists to see whether it matches. bcrypt mode hashes a password at a cost factor from 4 to 14 and checks a password against an existing bcrypt hash. SHA digests use the Web Crypto API, MD5 uses spark-md5 and bcrypt uses bcryptjs. Text and files are hashed in your browser and are not uploaded to our server.

03 · Guide

MD5 vs SHA-1 vs SHA-256 vs SHA-512 vs bcrypt

MD5 and SHA-1 are fast but no longer collision-resistant: researchers have produced different inputs with the same digest for both. They remain fine for spotting accidental corruption and for matching a checksum a publisher already lists, and unsuitable for signatures or anything an attacker can influence.

SHA-256 and SHA-512 belong to the SHA-2 family specified in FIPS 180-4 and have no known practical collisions. Use SHA-256 unless something specifically asks for SHA-512.

bcrypt is a password hashing function, not a checksum. It is deliberately slow, salts every hash, and stores the cost and salt inside its 60-character output, so hashing the same password twice gives two different strings. It only reads the first 72 bytes of its input.

AlgorithmOutputCollision-resistantUse it for
MD5128 bits, 32 hex charactersNoMatching legacy checksums, non-security fingerprints
SHA-1160 bits, 40 hex charactersNoMatching legacy checksums, Git object IDs
SHA-256256 bits, 64 hex charactersYesFile checksums, signatures, content addressing
SHA-512512 bits, 128 hex charactersYesAs SHA-256 where a longer digest is required
bcrypt60 characters including cost and saltNot applicableStoring passwords
Algorithms in this tool

04 · Use cases

When to use the Hash Generator

  1. 01

    Verify a downloaded file against the SHA-256 checksum its publisher lists

  2. 02

    Generate a bcrypt hash to seed a test user

  3. 03

    Check whether a password matches a stored bcrypt hash

  4. 04

    Get the MD5 or SHA-1 of a string for a cache key or ETag

05 · Examples

Hash Generator examples

hello world, SHA-256

ex 01

b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

The default input. The digest is 64 hex characters.

abc, SHA-256

ex 02

ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

A standard SHA-256 test vector, useful for checking another implementation.

(empty input), SHA-256

ex 03

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

This digest is worth recognising: if you see it, you hashed nothing, usually an empty file or a missing variable.

abc, MD5

ex 04

900150983cd24fb0d6963f7d28e17f72

An MD5 digest is 32 hex characters.

hunter2, bcrypt, cost 10

ex 05

$2b$10$J0nuR.mo14fKACk7.hXodeeqGErEPrLqdbs7eJr1WCvA/Yi6rOAVS

One possible result. The salt is random, so each run gives a different hash that still verifies against hunter2.

06 · FAQ

Hash: frequently asked questions

How do I verify a downloaded file's checksum?

Pick the algorithm the publisher used, usually SHA-256. Choose the file or drop it on the tool, then paste the published checksum into the compare field. The tool reports a match or a difference, and says so if the pasted value has the wrong length for the selected algorithm. Files up to 256 MB are supported and are read in your browser, not uploaded.

When should I use bcrypt instead of SHA-256?

Use bcrypt, or a newer password hash such as Argon2id, for passwords: it is slow on purpose and salts each hash, which makes guessing stolen hashes expensive. Use SHA-256 for checksums, signatures and deduplication, where speed matters and the input is not a low-entropy secret.

Is MD5 broken?

For collision resistance, yes: two different inputs with the same MD5 can be produced on purpose, so do not use it for signatures or integrity against an attacker. It still detects accidental corruption and is still what many older download pages list.

Does my text or file leave the browser?

No. Hashing runs in the page with the Web Crypto API, spark-md5 and bcryptjs, and neither the input nor the hash is sent to our server. The page loads analytics that record page views and button use, not content.

What is a salt, and does this tool add one?

A salt is random data mixed into the input so that identical passwords produce different hashes, which defeats precomputed tables. bcrypt generates one automatically and stores it in the output. MD5 and the SHA algorithms take no salt: the same input always gives the same digest.

What bcrypt cost factor should I use?

Each step doubles the work: cost 12 takes four times as long as cost 10. OWASP's Password Storage Cheat Sheet says to use a work factor of 10 or more for bcrypt. Pick the highest value your login server can afford. The cost is stored in the hash, so you can raise it later and re-hash as users log in.

How do I check a password against a bcrypt hash?

Select bcrypt, type the password, paste the existing hash (it starts with $2a$, $2b$ or $2y$ and is 60 characters long) and press Check. The tool reads the cost and salt from the hash, re-computes it and reports whether they match.

Why is the hash of an empty input not empty?

A digest always has the same length whatever the input. The SHA-256 of zero bytes is e3b0c442…b855 and the MD5 is d41d8cd9…427e. Seeing either usually means the thing you meant to hash was empty.

07 · Guides

Hash guides

08 · Reference

Specs and further reading

These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.

09 · More

Tools that pair with Hash

Last updated .