SHA1
Calculate SHA-1 hashes or HMAC-SHA-1 for text using UTF-8, UTF-16, Hex, Base64, and other input encodings. Read more
Calculate a SHA-1 hash online
SHA-1 maps input bytes to a fixed 160-bit digest. Enter text or encoded bytes, choose the input representation, and output the digest as lowercase Hex, uppercase Hex, or Base64. HMAC-SHA-1 is also available when an interoperating system requires a keyed value.
SHA-1 is retained primarily for legacy compatibility. Practical collision attacks mean it should not be selected for new digital signatures, certificates, or adversarial collision resistance; prefer SHA-256 or a stronger approved alternative.
How to calculate SHA-1
- Enter the source and select its exact input encoding.
- Choose the digest output representation.
- Enable HMAC only when a secret key is part of the required protocol.
- Calculate and compare the complete digest.
UTF-8 text abc produces a9993e364706816aba3e25717850c26c9cd0d89d.
Encoding and security
SHA-1 operates on bytes. UTF-8, UTF-16, Hex, Base64, line endings, and trailing spaces can all change the result. NIST FIPS 180-4 specifies SHA-1 and the SHA-2 family, while modern security guidance restricts SHA-1 use.
A hash is not encryption and cannot be decrypted. A plain digest also does not authenticate its source; HMAC adds a secret key but must follow the surrounding protocol exactly.
SHA-1 FAQ
Is SHA-1 safe for passwords?
No. Use a dedicated password-hashing scheme with salt and a configurable work factor.
Can SHA-1 still check a legacy download?
It can reproduce a published legacy checksum, but a trusted SHA-256 or stronger checksum is preferable when available.
How do I hash a file?
Use SHA-1 File Checksum. For new text hashing, consider SHA-256.