SHA-1 Encryption is an online SHA-1 hash tool that supports text string SHA-1 computation and file SHA-1 checksum verification. It implements the FIPS PUB 180-1 standard published by the National Institute of Standards and Technology (NIST), outputting a 160-bit (40 hexadecimal characters) hash value in both uppercase and lowercase formats.
Enter or paste the text you want to hash in the left input box.
Click the "Compute SHA-1" button, and the right side will display the SHA-1 hash in both uppercase and lowercase formats.
Click the copy icon next to each result field to copy the hash value to your clipboard.
In the file checksum section at the bottom, click "Select File" and choose any file to automatically compute its SHA-1 hash for integrity verification.
The tool is completely free and runs in your browser — no client software to download or install, compute hashes anytime, anywhere.
All SHA-1 operations (text hashing and file checksum) run locally in your browser; your content and files never leave your device, eliminating leakage risks.
SHA-1 remains the default hash algorithm for many legacy systems and tools (such as Git and older software distribution), so this tool conveniently matches existing SHA-1 checksums.
Provides both uppercase and lowercase hexadecimal output formats to meet display needs across different systems and scenarios.
Supports instant computation on input text strings as well as hash calculation for local files, covering both data checksum and integrity verification needs.
SHA-1 (Secure Hash Algorithm 1) was designed by the U.S. National Security Agency (NSA) and published by NIST in 1995 as the FIPS PUB 180-1 standard. It is the first revision of the SHA family, fixing a security flaw found in SHA-0.
The core process of SHA-1: ① Message padding — pad the message so its length ≡ 448 mod 512, then append a 64-bit representation of the original message length; ② Block processing — divide the padded message into 512-bit blocks; ③ Initialize 5 registers (A, B, C, D, E) of 32 bits each; ④ 80 rounds — each round applies bitwise operations, shifts, and constant additions to the registers; ⑤ Output 160 bits — concatenate the final 5 register values to produce the 160-bit hash.
Note: SHA-1 was proven vulnerable to practical collision attacks in 2017 (the SHAttered attack). Google and CWI Amsterdam successfully constructed two different PDF files with identical SHA-1 hashes. Therefore, for security-sensitive applications, SHA-256 or stronger hash algorithms are recommended.
The following table compares key characteristics of SHA-1 with other common hash algorithms:
| Algorithm | Output Bits | Speed | Security | Typical Use Case |
|---|---|---|---|---|
| MD5 | 128 | Fast | Broken (collision) | File checksum (non-security) |
| SHA-1 | 160 | Moderately Fast | Broken (collision, SHAttered) | Git VCS, legacy systems |
| SHA-256 | 256 | Moderate | Secure (unbroken) | Digital signatures, SSL/TLS, blockchain |
Git is the most popular version control system, and its underlying storage mechanism relies entirely on SHA-1. Every object in Git (commit, tree, blob, tag) is uniquely identified by the SHA-1 hash of its content. When you run git commit, Git computes the SHA-1 of the commit content and uses it as the commit's unique ID (the familiar 40-character hexadecimal string).
Although SHA-1 has been proven vulnerable to collision attacks, the Git community considers that in the context of version control, an attacker would need to simultaneously construct collisions and control the repository's commit history, making practical attacks extremely difficult. The Git team is gradually migrating to SHA-256, with support available since Git 2.29+.
SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function designed by the U.S. National Security Agency (NSA). It converts arbitrary-length input data into a fixed 160-bit (40 hexadecimal characters) output. SHA-1 is one-way and irreversible — the original data cannot be recovered from the hash value.
Key differences: ① Output length — SHA-1 outputs 160 bits (40 hex chars), MD5 outputs 128 bits (32 hex chars); ② Security — SHA-1 theoretically has stronger collision resistance than MD5, but both are now proven vulnerable to collision attacks; ③ Speed — MD5 is about 25% faster than SHA-1; ④ Applications — MD5 is commonly used for file checksums, while SHA-1 was widely used in digital signatures and Git version control.
SHA-1 is no longer considered secure. In 2017, Google and CWI Amsterdam successfully executed the SHAttered attack, constructing two different PDF files with identical SHA-1 hashes. For scenarios requiring collision resistance (such as digital signatures and SSL/TLS certificates), SHA-256 or SHA-3 is recommended. However, SHA-1 remains usable for file integrity verification and non-security-sensitive scenarios.
Git uses SHA-1 to identify every object (commit, tree, blob). Although SHA-1 has been proven vulnerable to collisions, in Git's use case an attacker would need to construct collisions and control the repository commit history, making practical attacks extremely costly. The Git community is migrating to SHA-256, with support available since Git 2.29+.
No. All SHA-1 operations (text hashing and file checksum) run entirely in your browser using the CryptoJS library on the client side. Your text content and file data never leave your device.
Yes. SHA-1's output length is always 160 bits (20 bytes). Regardless of the input data length (from 1 byte to several GB), SHA-1 always produces a 40-character hexadecimal hash value. This is a common property of all cryptographic hash functions — fixed output length independent of input length.
Both text and files are supported. In text mode you can type any characters; in file mode you can select any local file. All computation runs locally in your browser without uploading.
Speed grows slightly with file size, but remains fast overall. SHA-1 reads files in a streaming manner, and even large files usually finish within seconds. Computation runs locally, consuming no server resources or bandwidth.
No registration is required for basic use. The tool provides you with free daily usage credits; light everyday needs are covered at zero cost. For higher quotas or more frequent use, upgrade to a membership to unlock more benefits.
Yes. The page is responsive and works in mobile browsers too — you can enter text, upload files, and compute SHA-1, with the layout adapting automatically to your screen.
This is the deterministic nature of hash functions. SHA-1 is a deterministic function: identical input always yields identical output. As long as the text's case, spaces, and line breaks are exactly the same, the hash never changes, which is why it can be used to verify whether content was altered.
It is not recommended for new systems. Because SHA-1 is proven vulnerable to collision attacks, major browsers and certificate authorities have stopped issuing SHA-1 signed certificates; new projects should prefer SHA-256 or SHA-3. SHA-1 is now mainly retained for file integrity verification, Git, and other legacy-compatible scenarios.
Content last updated:2026-07-15
Online DES/2DES/3DES encryption and decryption tool, supporting all encryption modes and padding methods. Fully processed locally in the browser for security and efficiency.
Online AES encryption and decryption tool, supporting AES-128/192/256, covering all encryption modes and padding methods, secure, efficient, and easy to operate.
Online 3DES encryption/decryption tool, supporting all encryption modes and padding methods, fully processed locally in the browser to ensure data security.
Online RC4 stream cipher encryption/decryption tool, supports multiple key lengths, one-click encryption and decryption, all operations are completed locally in the browser to ensure data security.
Online Rabbit stream cipher encryption/decryption tool, using a high-speed symmetric encryption algorithm, supporting multiple key lengths. All operations are performed locally in the browser to ensure data security.
Online RC2 encryption and decryption tool, supporting ECB/CBC modes, variable key length and effective key bits, all processed locally in the browser to ensure data security.
Online IDEA International Data Encryption Algorithm Tool, supporting multiple encryption modes including ECB/CBC/CFB/OFB/CTR. All operations are performed locally in the browser to ensure data security.
Online Blowfish encryption/decryption tool supporting 128/192/256/448-bit variable keys, ECB/CBC/CFB/OFB modes, and multiple padding methods. All operations are performed locally in the browser to ensure data security.
CAST-128 (CAST5) online encryption and decryption tool, supporting multiple encryption modes such as ECB/CBC/CFB/OFB, flexible padding methods, and output encoding. All operations are performed locally in the browser, ensuring security and efficiency.
Online SM4 National Symmetric Encryption and Decryption Tool, supporting five working modes: ECB/CBC/CFB/OFB/CTR, and multiple padding methods. All operations are performed locally in the browser to ensure data security.
Online RSA asymmetric encryption and decryption tool, supporting key pair generation, public key encryption and private key decryption, private key signing and public key verification. All operations are performed locally in the browser to ensure data security.
Online MD5 hash encryption tool, supporting 16-bit/32-bit output, case switching, and file MD5 verification. All operations are completed locally in the browser, ensuring security and efficiency.
MD2 Encryption Tool: Generate 32-bit MD2 hash values online, supporting uppercase/lowercase output and file verification.
Online SHA-256 hash calculation tool for quick text encryption and file integrity verification.
Online SHA-384 hash calculation tool for fast text encryption and file integrity verification.
Online SHA-512 hash calculation tool, supporting text encryption and file integrity verification, quickly generating secure hash values.
Online SM3 National Hash Encryption Tool, supports text hash calculation and file verification, outputs a 256-bit hash value, compliant with GM/T 0004-2012 national standard.
Online Base64 encode/decode tool, supporting text Base64 encoding and decoding, all done locally in the browser, safe and efficient.
Online URL encoding and decoding tool, supports intelligent encoding and decoding of URL parameters, automatically identifies URL structure, processes only the parameter part, completes entirely in the browser locally, safe and efficient.
Online UTF-8 encoding/decoding tool, supporting conversion between text and UTF-8 hexadecimal bytes. All processing is done locally in the browser, ensuring data security.