SHA-1 Hash Generator

Generate SHA-1 digests in the browser with Web Crypto. This tool is for legacy digest reproduction, compatibility checks, and migration work—not new security-sensitive integrity designs.

Last updated: August 2026 | By Workshelve Team

SHA-1 is considered cryptographically obsolete for security-critical uses because collision attacks are practical. Prefer SHA-256 or stronger for new systems.

SHA-1 Digest
SHA-1 output will appear here...

Input bytes

0

Hash chars

0

Digest size

160 bits

Why SHA-1 still appears

SHA-1 remains relevant for reproducing legacy digests and identifiers, but collision attacks make it inappropriate for new security-sensitive designs.

What the tool hashes

This component hashes the UTF-8 bytes of the text you enter and renders the 160-bit result as 40 lowercase hexadecimal characters.

Important limits

Hashing is performed locally with Web Crypto and this component does not send the input anywhere, but SHA-1 is obsolete for signatures, certificates, and attacker-facing integrity checks.

What SHA-1 Does and Why It Is Legacy

SHA-1 is a cryptographic hash function that maps input bytes to a fixed 160-bit digest. This tool shows that digest as 40 lowercase hexadecimal characters. Like other hash functions, it is deterministic and one-way: identical bytes produce identical output, but the original text is not recoverable from the digest.

The tool hashes the UTF-8 bytes produced by JavaScript's TextEncoder. That means the exact byte sequence matters. Different whitespace, casing, Unicode code points, or normalization forms can produce different SHA-1 outputs even when text looks visually similar.

SHA-1 is kept here for legacy compatibility, historical checksum reproduction, and migration work. It should not be presented as a general modern integrity or security tool because practical collision attacks mean an attacker can deliberately engineer two different inputs with the same digest.

How to Use This Tool Safely

Output Semantics

Formula: displayed digest = hex(SHA-1(UTF-8(input)))
Digest size: 160 bits = 20 bytes = 40 hexadecimal characters
Because each byte is shown as two hex characters, a SHA-1 digest is always 40 characters long.

Safe and Unsafe Uses

Reasonable use: reproducing legacy digests, identifiers, or historical checksum values.
Unsafe use: new signatures, certificates, password storage, or attacker-facing integrity verification.
Empty text is still a valid message and has a defined SHA-1 digest.
This tool hashes text input only, not files or raw binary uploads.
Hashing is performed locally with Web Crypto; this component does not send the input anywhere. Web Crypto digesting requires a secure context (HTTPS) in supporting browsers.

Worked Examples

Example 1: SHA-1 of the empty string

Input:
"" (zero UTF-8 bytes)
Result:
da39a3ee5e6b4b0d3255bfef95601890afd80709

A legacy hash generator should still produce the defined SHA-1 digest for an empty byte sequence instead of treating blank input as invalid.

Example 2: Known SHA-1 test vectors

SHA-1("abc") = a9993e364706816aba3e25717850c26c9cd0d89d
SHA-1("Workshelve SHA-1 example") = c8a98b3d65554a849d2c5e18609f7ffe91b7727d

These values verify the implementation and make the output semantics explicit for users comparing known legacy digests.

Frequently Asked Questions

Why does this SHA-1 tool still exist?

Because some legacy systems, manifests, identifiers, and migration tasks still require reproducing historical SHA-1 values even though SHA-1 is obsolete for new cryptographic design.

Is SHA-1 still safe for integrity checks?

Not for attacker-facing integrity claims. If an attacker can choose inputs, SHA-1 collision attacks make it unsuitable. For modern integrity verification, use SHA-256 or stronger.

Does empty text really have a SHA-1 hash?

Yes. SHA-1 is defined for every byte sequence, including a zero-length message. The empty string hashes to da39a3ee5e6b4b0d3255bfef95601890afd80709.

Is hashing the same as encryption?

No. SHA-1 hashing is one-way and not reversible. Encryption is designed to be decrypted with the right key.

Can I use SHA-1 for password storage?

No. SHA-1 is both obsolete and far too fast for password storage. Use a dedicated password hashing or key-derivation algorithm such as Argon2id, scrypt, bcrypt, or PBKDF2.

Does this tool hash files?

No. It hashes the UTF-8 bytes of text entered into the textarea. File hashing requires reading raw file bytes rather than text input.

Related Tools