SHA-1 Hash Generator
Generate the SHA-1 hash of text or a file right in your browser, as hex or Base64, compare it with an expected hash, or switch to any other algorithm.
Input
Output
Readme
What is a hash?
A hash function turns any amount of data into a short, fixed-size fingerprint called a hash, digest, or checksum. The same input always gives the same hash, and changing a single byte gives a completely different one. That makes hashes useful for checking that a download arrived intact, spotting changed files, and identifying data without comparing it byte by byte.
Tool description
Type or paste text, or pick a file, and its hash appears right away. Each tool starts on the algorithm in its name, and you can switch to any other algorithm from the list at any time.
Text is hashed as UTF-8, exactly as typed, so spaces and line breaks count. Files are hashed byte for byte right in your browser, a piece at a time, with a progress bar for big files. Nothing is uploaded.
Show the hash as lowercase hex (as sha256sum and most websites print it), uppercase hex (as Windows tools print it), or Base64 (as used in subresource integrity and some APIs).
To check a download, paste the checksum its website publishes into Hash to compare. The tool tells you whether the hashes match, whatever notation the checksum is in: hex in either case, with or without spaces or colons, Base64, a prefix like sha256: or sha384-, or a whole line of a checksum file such as <hash> file.zip or SHA256 (file.zip) = <hash>. When the checksum has a different length than the selected algorithm's hashes, the tool says so, since it was most likely made with another algorithm.
Algorithms
| Algorithm | Hash size | Where it's used |
|---|---|---|
| MD5 | 128 bits | File checksums and older systems |
| SHA-1 | 160 bits | Git object IDs and older certificates |
| SHA-224 | 224 bits | A shorter variant of SHA-256 |
| SHA-256 | 256 bits | Download checksums, Docker image digests, Bitcoin, TLS certificates |
| SHA-384 | 384 bits | TLS and subresource integrity |
| SHA-512 | 512 bits | File checksums and Linux password schemes |
| SHA3-224, SHA3-256, SHA3-384, SHA3-512 | 224 to 512 bits | The SHA-3 standard, a modern alternative to SHA-2 |
| Keccak-256 | 256 bits | Ethereum addresses and Solidity's keccak256 |
| BLAKE2b | 512 bits | b2sum, Argon2 |
| BLAKE2s | 256 bits | WireGuard and other small devices |
| BLAKE3 | 256 bits | b3sum, fast hashing of large files |
| RIPEMD-160 | 160 bits | Bitcoin addresses, together with SHA-256 |
Keccak-256 is the algorithm SHA-3 was built from, with the original padding, so its hashes differ from SHA3-256 hashes of the same input. Ethereum uses Keccak-256.
Which algorithm should I use?
To match a checksum, use the algorithm it was made with; its name usually appears next to it. For new work, SHA-256 is the safe default, and BLAKE3 is a fast modern choice.
MD5 and SHA-1 still catch accidental damage, such as a broken download, but they are no longer safe against deliberate tampering, since different files with the same hash can be made on purpose. Don't store passwords as plain hashes of any algorithm: use a password hashing function such as bcrypt, scrypt, or Argon2.
Tips
echo "text" | sha256sumhashes the text with a line break at the end. Useecho -nor add the line break in the text box to get the same hash here.- Text copied from a Windows file may have used CR LF line breaks, which the text box turns into LF. Pick the file itself to hash its exact bytes.
Features
- MD5, SHA-1, SHA-2, SHA-3, Keccak-256, BLAKE2, BLAKE3, and RIPEMD-160
- Hashes text as you type, or files of any kind with a progress bar
- Lowercase hex, uppercase hex, or Base64
- Compares the hash with a checksum in any common notation
- Runs in your browser, so your text and files never leave your device