Hash

Generate SHA-1, SHA-256, SHA-384, SHA-512 hashes

MD5 is not provided — it's cryptographically broken and not available in the browser's SubtleCrypto API. Use SHA-256 or stronger.

What is a cryptographic hash?

A cryptographic hash function turns any input — a single character, a 5-page document — into a fixed-length string of hex digits. SHA-256 always produces 64 hex characters; SHA-512, 128. Two crucial properties: the same input always produces the same hash, and it's computationally infeasible to find two different inputs with the same hash (collision resistance).

Hashes are used for file integrity checks (downloading a file? compare its SHA-256 to the published value), password storage (servers store the hash, not the password), HMAC signatures, and content-addressed storage (Git uses SHA-1 to identify commits).

Examples

InputResult
helloSHA-256: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
(empty string)SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Frequently asked questions

Why no MD5?

MD5 is cryptographically broken — collisions can be generated in seconds on a laptop. The browser's SubtleCrypto API doesn't expose it on purpose. Use SHA-256 or stronger.

Can I hash a file?

This tool hashes text input. To hash a file, drop into the browser console: `crypto.subtle.digest('SHA-256', await file.arrayBuffer())`.

Is the hash deterministic across runs?

Yes — SHA-256 of 'hello' is always the same value. Hash functions are pure (no salt, no randomness) by design.

Should I use SHA-1?

Avoid for new applications — it's been broken for collision attacks. SHA-1 is still common for file checksums and Git, but use SHA-256 for anything security-relevant.

Is my input sent anywhere?

No. Hashing uses the browser's native crypto API; nothing leaves your device.