What This Tool Does

This hash generator computes cryptographic hash values for any text input using the browser's native Web Crypto API. Hashes are one-way fingerprints — useful for verifying file integrity, storing password checksums, de-duplicating data, and creating content-addressable identifiers. Supports SHA-1, SHA-256, SHA-384, and SHA-512 (and MD5 via client-side implementation).

Inputs Explained

How It Works

The tool encodes your input as UTF-8 bytes using TextEncoder, then passes it to crypto.subtle.digest() — the browser's built-in cryptographic hash function. Each algorithm produces a fixed-size output: SHA-1 = 160 bits (40 hex chars), SHA-256 = 256 bits (64), SHA-384 = 384 (96), SHA-512 = 512 (128). MD5 is computed via a small JS implementation.

Formula / Logic Used

bytes = TextEncoder.encode(text) hash = crypto.subtle.digest(algorithm, bytes) hex = bytesToHex(hash)

Hash Generator (MD5, SHA-1, SHA-256, SHA-512)

Compute MD5, SHA-1, SHA-256, and SHA-512 hashes using the browser's Web Crypto API.

Step-by-Step Example

Input: Hello, BulkCalculator!

MD5: f7c3bc1d808e04732adf679965ccc34ca7ae3441 (16 bytes / 32 hex chars)

SHA-256: 3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b (32 bytes / 64 hex chars)

SHA-512: ... 128 hex chars ...

Changing even one character produces a completely different hash — this is called the avalanche effect.

Use Cases

Assumptions and Limitations

Disclaimer: Hashes are computed in your browser. For password storage, always use specialized password hashing libraries (bcrypt/Argon2) — never plain SHA or MD5.

Frequently Asked Questions

What is a hash?

A cryptographic hash is a one-way function that converts input of any size into a fixed-size output. The same input always produces the same output. Hashes are used for verifying data integrity, indexing, and cryptographic signatures.

Which hash should I use?

For security: SHA-256 or SHA-512 (widely used, still strong). Avoid MD5 and SHA-1 for security — they have known vulnerabilities. For non-security uses (like deduplication or simple fingerprinting), any hash including MD5 is fine for speed.

Why is MD5 considered broken?

MD5 has proven collision weaknesses — attackers can generate two different inputs with the same hash. This makes it unsafe for digital signatures or password hashing, though it's still useful for non-security purposes like checksums.

Can I reverse a hash to get the original text?

No. Hash functions are one-way by design. However, common passwords can be 'cracked' through rainbow tables (precomputed hash databases) or brute-force guessing. This is why password storage requires salting and slow hashes (bcrypt).

Why should I never use SHA for passwords?

SHA is fast, which is great for most uses but terrible for passwords — attackers can try billions of guesses per second. Password storage needs slow, salted algorithms like bcrypt or Argon2 that are designed to resist brute-force attacks.

What is the avalanche effect?

A property where changing one bit of input changes roughly half the bits of the hash output. This makes hashes excellent at detecting any change — even flipping one character produces a completely different result.

Is my data sent to any server?

No. All hashing happens in your browser using the Web Crypto API or local JavaScript. Your input text never leaves your device — you can hash sensitive data safely here.

How do I verify a file download hash?

Download the file, compute its SHA-256 using a desktop tool (this online tool doesn't accept file uploads for safety), and compare with the published hash on the official website. Matching hashes mean the file is authentic.

Sources and References

Related Calculators

Base64 EncoderUUID GeneratorPassword GeneratorJWT DecoderURL EncoderJSON Formatter