Skip to content
toolgrid

No tool found. Try another word.

SHA-1 Hash Generator

Generate the SHA-1 hash of any text or file, as hex or Base64, with optional HMAC and a check against an expected hash.

·

✓ The hashes match

✗ The hashes do not match

Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.

How to use the SHA-1 Hash Generator

  1. 1 Type or paste your text, or switch to File and choose a file.
  2. 2 Optionally turn on HMAC and enter a key.
  3. 3 Copy the SHA-1 hash, or paste an expected hash to compare.

About the SHA-1 Hash Generator

SHA-1 turns any input into a fixed-length fingerprint of 160 bits, written as 40 hexadecimal characters. The same input always gives the same hash, the smallest change gives a completely different one, and you cannot turn the hash back into the input.

SHA-1 is deprecated for security: in 2017 researchers published two different PDF files with the same SHA-1 (the SHAttered attack). Git still uses it to identify objects, and it is fine for checksums, but use SHA-256 for anything that must resist attackers.

Text is hashed as UTF-8 bytes, exactly like most programming languages do, so the result matches sha1sum on the command line for the same bytes. Files are read in chunks in your browser, so even very large files work. With HMAC, a secret key is mixed in (RFC 2104), which is how APIs and webhooks sign their messages.

Frequently asked questions

Can a SHA-1 hash be decrypted?

No. A hash is a one-way function: there is no key to reverse it. "Decrypting" sites only look the hash up in tables of known inputs, which works for common words and short passwords.

Why does my SHA-1 differ from another tool?

Usually because of invisible differences in the input: a trailing newline, a different line ending (Windows CRLF versus LF) or a different text encoding. This tool hashes exactly the characters in the box, as UTF-8.

What is the SHA-1 of an empty string?

da39a3ee5e6b4b0d3255bfef95601890afd80709. It's a quick way to recognise an empty input.

What is HMAC for?

HMAC proves that a message was made by someone who knows the secret key, and that it was not changed. Webhook providers such as Stripe and GitHub sign their requests with HMAC-SHA256.

Should I use SHA-1 for passwords?

No. Plain hashes are far too fast: attackers try billions per second. Store passwords with a slow, salted hash such as Argon2id or bcrypt; our password hash generator makes them.