Hash Generator: Compute SHA-1, SHA-256, SHA-384 and SHA-512 Online

‱
DataFmt Team
‱
#hash #sha-256 #cryptography #security #developer-tools
5 min read

Hash Generator: Compute SHA-1, SHA-256, SHA-384 and SHA-512 Online

Cryptographic hashes are the backbone of modern security: integrity checks, password storage, digital signatures, blockchain, file deduplication, and content-addressable storage all rely on them. Our Hash Generator computes SHA-1, SHA-256, SHA-384 and SHA-512 entirely in your browser using the native Web Crypto API — your data never leaves the page.

What is a cryptographic hash?

A cryptographic hash function is a one-way mathematical function that takes any input and produces a fixed-length, deterministic output (the digest). Good hash functions have three properties:

  1. Deterministic — the same input always produces the same hash.
  2. Avalanche effect — a tiny change in the input produces a wildly different hash.
  3. Pre-image resistance — given a hash, it is computationally infeasible to recover the original input.

Which algorithm should I use?

AlgorithmOutput sizeStatusRecommended for
SHA-1160 bitsDeprecated for securityLegacy compatibility, Git object IDs
SHA-256256 bitsSecureGeneral use, TLS, signatures, JWT (HS256)
SHA-384384 bitsSecureHigher-security signatures, Subresource Integrity
SHA-512512 bitsSecureMaximum collision resistance, password KDFs

⚠ SHA-1 is broken for collision resistance since 2017 (Google’s SHAttered attack). Don’t use it for signatures or password hashing. SHA-256 is the safe modern default.

Common use cases

  • File integrity checks — verify a download matches the publisher’s checksum.
  • Subresource Integrity (SRI) — pin third-party scripts with integrity="sha384-..." attributes.
  • Git — every commit, tree and blob is identified by a SHA-1 (and now SHA-256) hash.
  • JWT signing — HS256 uses HMAC with SHA-256.
  • Deduplication — detect identical files without comparing them byte-by-byte.

How our tool works

Everything runs client-side via crypto.subtle.digest():

const data = new TextEncoder().encode("hello");
const digest = await crypto.subtle.digest("SHA-256", data);
// 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

You can hash plain text, paste large payloads, or drop a file (any size — the API streams the buffer). Switch the output to Hex (the standard format) or Base64 (compact, useful for Authorization headers and SRI).

Things hash functions are not

  • ❌ Encryption — hashes are one-way; you can’t recover the input.
  • ❌ Password storage on their own — use a password-hashing function like Argon2, bcrypt, or scrypt instead, which adds salting and intentional slowness.
  • ❌ Random IDs — use crypto.randomUUID() or our Key Generator for that.

Try it now

Head over to the Hash Generator and start computing checksums in seconds. No uploads, no tracking, no account.

Found this helpful? Try our free tools!

Explore Our Tools →