Randomly

SHA-1 Hash Generator

Type or paste text and get its SHA-1 hash, computed in your browser.

Input

SHA-1 · 40 hex

160-bit

Type text in the input panel to see its hash.

SHA-1 produces a 160-bit digest. Still found in legacy systems and Git object IDs, but practical collision attacks make it unsafe for any new security use.

Digest
160-bit
Output
40 hex

Related tools

Guides

Type or paste text into this SHA-1 hash generator and the 40-character hex digest appears as you type. The hash is computed in your browser with the Web Crypto API, so your text isn't sent anywhere.

SHA-1 turns any input into a fixed 160-bit value. It still turns up in older systems, and Git uses it for object IDs, but it is no longer safe for anything security-related. In 2017 researchers published two different PDF files with the same SHA-1 hash. For new work, use SHA-256.

What a SHA-1 hash generator is for

A hash is a short fingerprint of some data. The same input always gives the same hash, and changing one character changes it completely. You'll still run into SHA-1 hashes in:

  • Checksums published next to older software downloads
  • Legacy systems that store or compare SHA-1 values
  • Git object IDs (Git hashes a short header along with the content, so its IDs won't match a plain hash of the same text)
  • Classes and tutorials on hash functions

How to use the SHA-1 hash generator

  1. Type or paste text into the input box.
  2. The SHA-1 digest updates as you type. There's no button to press.
  3. Click the hash, or Copy digest, to copy it.

Things to watch for

  • Whitespace counts. A trailing newline or space gives a completely different hash, which is the usual reason a result doesn't match one made with echo in a terminal.
  • Text is encoded as UTF-8 before hashing, the same as most command-line tools.
  • This page hashes text only. To hash a file, run shasum -a 1 on macOS or sha1sum on Linux.

Example SHA-1 hash output

The word hello, lowercase with no trailing newline, hashes to:

  • hello → aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d

Frequently asked questions

What is SHA-1?

Secure Hash Algorithm 1, a hash function designed by the NSA and published by NIST in 1995. It produces a 160-bit hash, written as 40 hex characters.

Is this SHA-1 Hash Generator free?

Yes, with no sign-up.

Can I hash a file?

Not on this page. It only hashes text you type or paste. Use shasum -a 1 on macOS or sha1sum on Linux for files.

Is SHA-1 encryption?

No. A hash can't be turned back into the original text, while encrypted data can be decrypted with the right key.

Is SHA-1 secure?

Not for security. Collisions have been produced in practice, so don't use SHA-1 for signatures, certificates, or passwords. It's still fine for spotting accidental changes in data you already trust.

Built and maintained by Bipul Kumar. Found a wrong number or a broken result? Tell me and I'll fix it.