How to use the Hash generator tool
- Pick SHA-256, SHA-384, SHA-512 or SHA-1 under Algorithm.
- To hash a file, choose it under File (optional). To hash text, leave that field empty and type or paste into the Text box.
- Select Calculate hash, or select Example to hash a short sample string with SHA-256.
- Read the digest in the Result box as lowercase hexadecimal.
- Select Copy and compare the value with the checksum published by the file's source.
What a hash generator computes
A cryptographic hash function maps input of any length to a fixed-length value called a digest. The same input always gives the same digest, a one-bit change gives a completely different one, and there is no practical way to work backward from the digest to the input.
SHA-256, SHA-384 and SHA-512 belong to the SHA-2 family standardized in FIPS 180-4. They process the input in blocks, 512 bits for SHA-256 and 1024 bits for the other two, and mix each block into an internal state. SHA-384 is SHA-512 with different starting values and a truncated output.
Example digests for the same text
These are the results for the 13-character string that the Example button loads. The output length depends only on the algorithm: 40 hex characters for SHA-1, 64 for SHA-256, 96 for SHA-384 and 128 for SHA-512.
Text: Hello, world!
SHA-1
943a702d06f34599aee1f8da8ef9f7296031d699
SHA-256
315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
SHA-384
55bc556b0d2fe0fce582ba5fe07baafff035653638c7ac0d5494c2a64c0bea1cc57331c7c12a45cdbca7f4c34a089eeb
SHA-512
c1527cd893c124773d811911970c8fe6e857d6df5dc9226bd8a160614c0cd963a4ddea2b94bb7d36021ef9d865d5cea294a82dd49a0bb269f51f6e7a57f79421Text input, file input and exact bytes
A hash covers bytes, not characters. Text from the box is encoded as UTF-8 and hashed exactly as entered, with no trimming, so a trailing space or line break changes the result. Empty text is valid input: its SHA-256 is e3b0c442 followed by 56 more hex characters.
When a file is chosen it takes priority and the Text box is ignored. The file is read into memory and hashed as is. Files over 40 MiB are rejected. This is the mode to use for verifying downloads. Browsers normalize line breaks in a text box to a single line feed, so pasted content from a file with Windows line endings no longer matches the bytes on disk.
Choosing between SHA-256, SHA-512 and SHA-1
All four options run through the same Web Crypto call, so the choice is about what the other side expects. MD5 is not available, because the Web Crypto API does not provide it.
None of these is a password hashing function. They are designed to be fast, which helps an attacker who is guessing. Store passwords with a slow, salted algorithm such as Argon2, scrypt or bcrypt.
- SHA-256 is the common default for file checksums, package integrity, TLS certificates and content addressing.
- SHA-512 gives a 512-bit digest for a larger security margin.
- SHA-384 appears in TLS cipher suites and is widely used in Subresource Integrity attributes.
- SHA-1 is offered for legacy checks only. Practical collisions have been public since 2017, so do not use it for signatures or new designs.
Frequently asked questions
How do I verify a file checksum with this tool?
Select the algorithm the publisher used, usually SHA-256, choose the downloaded file and select Calculate hash. Compare the result with the published value, ignoring letter case. Any difference means the file is not identical to the original.
Is my file uploaded to compute the hash?
No. The browser reads the file locally and the digest is computed by the built-in Web Crypto API. The file contents and the text you type are not sent over the network.
Why does my hash differ from sha256sum or another tool?
The inputs differ by at least one byte. Frequent causes are a trailing newline, since echo adds one unless you use printf or echo -n, different line endings, or a different text encoding.
Can a SHA-256 hash be decrypted?
No. Hashing is not encryption and there is no key. A digest cannot be reversed, although short or common inputs can be found by guessing and comparing.
Does this tool support MD5 or HMAC?
No. It offers SHA-1, SHA-256, SHA-384 and SHA-512 as plain digests. There is no MD5 option and no keyed mode, so it cannot produce an HMAC signature for webhook or API request signing.