Skip to content

SHA Hash Generator

Generate cryptographic hashes with the Web Crypto API and read them in hex or Base64. Useful for verifying checksums, comparing payloads and generating fingerprints — all computed locally.

  • SHA-1, SHA-256, SHA-384, SHA-512
  • Hex and Base64 output
  • Native Web Crypto implementation
  • All algorithms at once
  • Nothing leaves your device

Hasher

Computed with your browser's Web Crypto

How to generate a SHA hash

  1. 01

    Paste your text

    Enter the string you want to hash. It is encoded as UTF-8 before hashing, which is the standard behaviour.

  2. 02

    Read all four digests

    SHA-1, SHA-256, SHA-384 and SHA-512 are computed at once so you can compare against whichever one your system expects.

  3. 03

    Pick hex or Base64

    Hex is the usual format for checksums and file fingerprints. Base64 is common in HTTP headers such as Subresource Integrity.

  4. 04

    Copy and compare

    Copy the digest and compare it against the expected value. Any difference at all means the inputs are not identical.

What a hash function guarantees

A cryptographic hash maps input of any length to a fixed-size digest. Three properties make it useful: the same input always yields the same digest, changing a single bit changes roughly half the output bits, and there is no practical way to work backwards from a digest to the input.

That last property is why hashing is not encryption. There is no key and no decryption step — the operation is one-way by design. If you need to recover the original data later, hashing is the wrong tool.

Which algorithm to use

SHA-256 is the sensible default for almost everything: fast, universally supported, no known practical weaknesses. SHA-512 produces a longer digest and is often *faster* on 64-bit hardware because it operates on 64-bit words.

SHA-1 is broken for security purposes. A practical collision was demonstrated in 2017 (the SHAttered attack), and browsers and certificate authorities have rejected it for years. It survives only in legacy contexts such as Git object identifiers, where collision resistance is not the property being relied on. It is offered here for compatibility, not as a recommendation.

Never hash passwords with SHA

SHA functions are engineered to be fast, which is exactly the wrong property for password storage. Modern GPUs compute billions of SHA-256 hashes per second, so a leaked table of SHA-256 password hashes falls to a dictionary attack almost immediately — salt or no salt.

Password storage needs a deliberately slow, memory-hard function with a tunable cost factor: Argon2id, scrypt or bcrypt. These are designed so that raising the cost parameter makes attacks proportionally more expensive while barely affecting a legitimate login.

Where hashes show up day to day

Integrity verification. A project publishes the SHA-256 of a release; you hash your download and compare. If the digests match, the file was not altered in transit.

Subresource Integrity. A <script integrity="sha384-..."> attribute tells the browser to refuse a CDN script whose digest does not match, protecting you if the CDN is compromised.

Deduplication and caching. Content-addressed systems — Git, Docker layers, most build caches — name objects by their hash, so identical content is stored exactly once.

Frequently asked questions

Is my text sent anywhere to be hashed?

No. Hashing uses the Web Crypto API built into your browser. The text never leaves your device, which matters since people frequently hash sensitive strings to test a comparison.

Can a hash be reversed back to the original text?

Not by inverting it — hash functions are one-way. What does work is guessing: if the input is short or predictable, an attacker can hash billions of candidates and compare. That is why hashing is not a substitute for encryption.

Why is MD5 not offered here?

MD5 is cryptographically broken — collisions can be produced in seconds on ordinary hardware — and it is not available in the Web Crypto API. Since any legitimate use is legacy checksum comparison rather than security, we do not offer it.

Should I use SHA-256 to store passwords?

No. SHA-256 is too fast, which makes brute-force attacks cheap. Use Argon2id, scrypt or bcrypt, all of which are deliberately slow and have a tunable cost factor.

What is the difference between hex and Base64 output?

They encode the same bytes. Hex uses two characters per byte and is the convention for checksums and Git hashes. Base64 is about a third shorter and is what HTTP headers such as Subresource Integrity expect.

Why do I get a different hash than another tool?

Almost always a difference in the input, not the algorithm. A trailing newline, a space, or a different text encoding produces a completely different digest. This tool hashes exactly what you paste, encoded as UTF-8.

Developers

JWT Decoder

Decode the header and payload of a JWT without the token ever leaving your browser.

Developers

.env Validator

Catch quoting, duplicate and syntax bugs in a .env file before they break your deploy.

Developers

Cron Expression Parser

Translate a cron expression into plain English and see exactly when it runs next.