⚡ Free online tool · No signup

SHA-1 Hash Generator

Make a SHA-1 hash of any text or file, check a download against its SHA-1 checksum, and create HMAC-SHA1 signatures. Everything runs in your browser.

Text & files HMAC-SHA1 Verify checksums Hex or Base64 100% private
Algorithm

SHA-1 hash

All SHA hashes of this text

🔒 Everything runs in your browser. Your text, keys and files are never uploaded.

Free SHA-1 Hash Generator

This free SHA-1 hash generator gives you the SHA-1 hash of any text or file, the 40-character fingerprint that older systems, version control and many download pages still use. Type or paste text and the hash appears as you type. Drop in files to get their SHA-1 checksums and compare them with the expected value or a checksum file. You can also create HMAC-SHA1 signatures with a secret key. Everything runs in your browser, so nothing you enter is uploaded.

What is SHA-1?

SHA-1 (Secure Hash Algorithm 1) is a hash function published by NIST in 1995. It turns data of any length into a 160-bit value, written as 40 hexadecimal characters. The SHA-1 hash of the word hello is:

aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d

and the SHA-1 hash of empty input, with no characters at all, is da39a3ee5e6b4b0d3255bfef95601890afd80709. If you see that value where you expected something else, the text or file that was hashed was empty.

Like every hash function, SHA-1 always gives the same result for the same bytes, and the smallest change to the input gives a completely different hash.

How to create a SHA-1 hash

  1. Make sure SHA-1 is selected under Algorithm.
  2. Type or paste your text into the Text to hash box. The SHA-1 hash appears right away.
  3. Pick a Hash format: lowercase hex, UPPERCASE hex or Base64.
  4. Click Copy hash.

To hash a list, turn on Hash each line separately and you get one SHA-1 hash per line, ready to copy or download.

How to verify a file with a SHA-1 checksum

  1. Open the Files tab and drop the file, or click to choose it. Files of any size work, because they are read in pieces.
  2. Paste the SHA-1 value from the download page into Expected hash.
  3. A green Matches the expected hash label means the file arrived complete and unchanged. A red label means something is different: the download may be broken, or it’s another version of the file.

If the download page offers a checksum file, such as SHA1SUMS or file.zip.sha1, drop it in with your files instead. Every file it lists is checked, and you see at a glance which ones match.

How to make an HMAC-SHA1 signature

  1. Turn on Use a secret key (HMAC).
  2. Enter the key. If it is written as hex or Base64, set Key is to match.
  3. Type the message. The HMAC-SHA1 value appears below it.

HMAC-SHA1 is still common in older APIs and webhooks. It is also what one-time passcode apps use to turn a shared secret and the current time into a six-digit sign-in code.

Is SHA-1 still secure?

Not for everything. In 2017, researchers created two different PDF files with the same SHA-1 hash. A pair like that is called a collision, and it means an attacker with enough computing power can make two documents that SHA-1 can’t tell apart. Since then SHA-1 has been retired from places where that matters:

  • Digital certificates and signatures moved to SHA-256 years ago, and browsers no longer accept SHA-1 certificates.
  • New systems should use SHA-256 or SHA-512 instead.

SHA-1 is still fine for jobs where nobody is trying to fool you:

  • Checking a download for errors. An accidental change, such as a broken transfer, always changes the SHA-1 hash.
  • Finding duplicate files and naming data by its content.
  • HMAC-SHA1. Because a secret key is mixed in, collisions don’t help an attacker, so HMAC-SHA1 is still considered safe, although HMAC-SHA256 is preferred for new work.

Features

Live SHA-1 hashing

The hash changes with every keystroke. The line above it shows the length (40 hex characters, 160 bits) and how many bytes were hashed.

Text, hex or Base64 input

Text is hashed as UTF-8, so accented letters and emoji give the same hash as on other systems. Choose Hex bytes or Base64 under Input is to hash raw bytes instead.

Compare a hash and see why it differs

Paste a hash into Compare with a hash. When it doesn’t match, the tool checks the common causes: a line break at the end, spaces around the text, Windows line breaks, a hash from a different SHA algorithm or an HMAC without the key. Most of them can be fixed with one click.

All SHA hashes at once

Under the SHA-1 hash you also get SHA-224, SHA-256, SHA-384 and SHA-512 of the same text, each with a Copy button. Handy when you are moving from SHA-1 to a stronger hash.

Checksum files

Download checksum file saves one line per file with the hash, two spaces and the file name, the format most checksum lists use. Drop such a list back in later to check the same files again.

SHA-1 vs. MD5 vs. SHA-256

  • MD5 makes a 128-bit (32-character) hash. Collisions have been easy to make for many years, so use it only to catch accidental errors.
  • SHA-1 makes a 160-bit (40-character) hash. Collisions are possible but expensive. Fine for error checking and HMAC, not for signatures.
  • SHA-256 makes a 256-bit (64-character) hash and has no known weakness. It is the usual choice today.

Not sure which one a hash is? Count the characters: 32 is MD5, 40 is SHA-1, 64 is SHA-256. When you paste a hash into Compare with a hash, the tool tells you which algorithm its length belongs to and can switch to it.

Why doesn’t my SHA-1 hash match?

Every byte counts, including the ones you can’t see. The usual reasons are a line break at the end (a terminal’s echo adds one unless you use echo -n), spaces at the start or end, Windows line breaks, a different letter case or a different algorithm. Paste the expected value into Compare with a hash and the tool checks these for you. Upper and lower case in hex hashes don’t matter.

Is it private?

Yes. The SHA-1 hash generator runs entirely in your web browser. Your text, keys and files are hashed on your device and are never sent anywhere. The tool remembers settings such as the hash format, never your text, keys or files.

Frequently asked questions

Is this SHA-1 hash generator free?

Yes. It’s free, with no sign-up and no limit on how much text or how many files you hash.

How long is a SHA-1 hash?

A SHA-1 hash is 160 bits, which is 20 bytes. Written in hex it is 40 characters long, and in Base64 it is 28 characters.

Can SHA-1 be decrypted or reversed?

No. SHA-1 is a one-way function, so the original text can’t be calculated from the hash. Short or common inputs can still be found by guessing, which is why passwords should never be stored as plain SHA-1 hashes.

Is SHA-1 safe to use?

SHA-1 is safe for detecting accidental changes, such as a broken download, and HMAC-SHA1 is still considered secure. It is not safe for digital signatures or certificates, because two different files with the same SHA-1 hash can be made. Use SHA-256 for new systems.

How do I check a file’s SHA-1 checksum?

Open the Files tab, drop the file and paste the expected SHA-1 value into Expected hash. A green label means the file matches. You can also drop a SHA1SUMS or .sha1 checksum file together with the files it lists.

What is the SHA-1 hash of an empty string?

It is da39a3ee5e6b4b0d3255bfef95601890afd80709. If you get this value, the text or file you hashed was empty.

What is HMAC-SHA1?

HMAC-SHA1 is a signature made by hashing a message together with a secret key. It proves the message comes from someone who has the key and wasn’t changed. Turn on Use a secret key (HMAC) to create one.

Are my text and files uploaded?

No. All hashing happens in your browser, and nothing you enter or drop in leaves your device.