Hash some text
Type or paste text and the digest updates as you go. Nothing is sent to our server.
SHA-256 digest
Everything stays in your browser. Nothing is sent or saved.
How to use the hash generator
- Pick the algorithm. SHA-256 is the usual choice; SHA-1 is only for checking older systems.
- Add a salt if you need one. It is put in front of the text before hashing.
- Type or paste the text to hash. Every character counts, spaces and line breaks included.
- Copy the hex digest and compare it with the one you were given.
How the hash generator works
A hash function turns any amount of text into a fingerprint of a fixed length. The same input always gives the same digest, a one-character change gives a completely different one, and there is no way to run it backwards. The tool hashes the text’s UTF-8 bytes with your browser’s Web Crypto API.
Inputsalt + text, as UTF-8 bytes
SHA-1160 bits, 40 hex digits
SHA-256256 bits, 64 hex digits
SHA-512512 bits, 128 hex digits
Comparing two digests is how you check a download, spot a changed file or confirm that two copies match, without comparing the files themselves.
- Text
- correct horse battery staple
- Salt
- none
- Algorithm
- SHA-256
- Digest, first 16 of 64 digits
- c4bbcb1fbec99d65…
Type meadow into the salt box and the digest becomes 942a78eab1a98e7f…, nothing like the first. Add one space to the text and it changes completely again.
Hash generator FAQ
What is a hash used for?
Checking that something has not changed. Publish the SHA-256 of a file and anyone can hash their download and compare the two. Hashes also sit underneath digital signatures, Git commits and file deduplication.
Can I store passwords as SHA-256 hashes?
Not on its own. SHA-256 is built to be fast, so an attacker with a stolen list can test billions of guesses a second. Store passwords with a slow, salted password hash like bcrypt or Argon2, which your framework already has, and make them long with the password generator.
What is a salt?
Extra text added to the input before hashing, so two people with the same password don’t get the same digest and a table of precomputed hashes is useless. Each password gets its own random salt, stored next to the hash. It doesn’t need to be secret.
Why does my digest not match?
Something in the input differs: a trailing space, a line break, a capital letter or a different text encoding. JSON is a common trap, because the same data with different spacing hashes differently. Minify both copies with the JSON formatter first, then compare.
How do webhooks use hashes?
Most services sign each webhook with an HMAC: a hash of the body mixed with a secret key you share with them. You compute the same HMAC and compare. Many include a Unix timestamp in the signed text, so an old request replayed later is refused. This tool makes plain hashes, not HMACs.
More developer tools
Password generatorStrong, copy-ready passwords with length, symbol and number controls, plus a strength read.JSON formatterPretty-print, minify and validate JSON with clear, human error messages when it breaks.UUID generatorBatch RFC-4122 v4 UUIDs generated locally in your browser, no server round-trip.Base64 encode / decodeConvert text to and from Base64, Unicode-safe, with a one-click copy of the result.