What this hash generator does
This English-language hash generator computes SHA-1, SHA-256, SHA-384, and SHA-512 digests from any text you type or paste. It uses the browser's native Web Crypto API (crypto.subtle.digest) — the same FIPS-validated primitives your operating system uses — so there are no JavaScript polyfills and no third-party libraries involved. Output is a lowercase hex string you can copy with one click.
The tool is 100% client-side — your data never leaves your browser. No uploads, no tracking, no server logs. That matters when you're hashing API keys, tokens, or any text that should stay private. MD5 was first published in 1991 and had its first known collision in 2004; SHA-1 followed with the SHAttered collision in 2017. Both are included here for legacy checksum workflows, with a clear warning not to rely on them for anything security-relevant.
Features
- Four algorithms, one view. SHA-1, SHA-256, SHA-384, and SHA-512 are computed in parallel as you type, so you can compare digest lengths side by side without switching tabs.
- Native Web Crypto engine. Uses
crypto.subtle.digest— a browser-native API backed by the same FIPS 180-4 SHA-2 specification used in TLS and code-signing pipelines. No third-party crypto library is loaded. - Real-time hex output. Hashes update on every keystroke. Output is a lowercase hex string — the format expected by most APIs, databases, and command-line tools like
sha256sum. - One-click copy. Each digest has its own Copy button. The label flips to 'Copied!' for two seconds so you know the clipboard was written without needing to look away.
- Completely private. No network requests are made after the page loads. Your input is processed entirely in memory — useful when hashing secrets, tokens, or internal identifiers you can't paste into an external service.
- Unicode-aware. Input is encoded as UTF-8 before hashing, matching the behavior of most server-side implementations. Unicode 15.1 added 627 new characters in 2023; all of them hash correctly here.
How to use the hash generator
Paste or type your text in the input field and all four hashes appear immediately — no button to click.
- Enter your text. Type or paste any string into the input field. The tool accepts plain text, JSON, URLs, or any UTF-8 content.
- Read the digests. SHA-256 and SHA-512 appear below the field alongside SHA-1 and SHA-384. Longer algorithms produce longer hex strings: SHA-256 outputs 64 hex characters; SHA-512 outputs 128.
- Copy the hash you need. Click the Copy button next to the algorithm you want. To reproduce the same hash in code:
await crypto.subtle.digest('SHA-256', data)in JavaScript, orecho -n 'hello' | sha256sumin bash. - Verify a known hash. Paste your original text and compare the output to a published checksum. If the hex strings match character-for-character, the content is identical.
Common use cases
- File integrity and fingerprinting. Compute a SHA-256 digest of a configuration file or build artifact before and after a transfer. A mismatched hash reveals corruption or tampering — the same technique used in Linux distribution mirrors and package managers like Homebrew.
- ETag and cache key generation. Hash a response body to produce a deterministic ETag header for HTTP caching. This is common in CDN pipelines and static asset servers in infrastructure teams from Boston to San Francisco.
- Idempotency keys. Generate a stable identifier from a request payload — for example, SHA-256 of a JSON body — so that retried API calls don't create duplicate records. Many payment APIs and event queues require this pattern.
- Content-addressed storage. Use a SHA-256 hex digest as the key for storing blobs in a database or object store. This is the foundation of systems like Git's object model and IPFS content routing.
- Legacy checksum verification. Some older download pages still publish MD5 or SHA-1 checksums. This tool can generate a matching hash for non-security verification — while the warning reminds you not to trust these algorithms for anything cryptographic.
Frequently asked questions
Is my input sent to a server?
No. The page uses the browser's built-in crypto.subtle.digest API, which runs entirely in your JavaScript engine. Nothing is transmitted after the initial page load — there is no backend, no logging, and no analytics that see your text.
What's the difference between a hash and encryption?
Hashing is a one-way function: you cannot recover the original input from the digest. Encryption is reversible — given the key, you can decrypt. Use hashing for checksums and fingerprints; use encryption when you need to recover the original data later.
Can I use SHA-256 to store passwords?
You should not. Raw SHA-256 is fast by design, which makes brute-force and rainbow-table attacks practical. Password storage requires a slow, salted algorithm like bcrypt, scrypt, or Argon2id. This tool is useful for checksums and fingerprints, not credential hashing.
Why does the same JSON object sometimes produce different hashes?
JSON does not guarantee key order. Two objects that are semantically identical — {"a":1,"b":2} vs {"b":2,"a":1} — produce different byte sequences and therefore different hashes. If you need a stable hash for JSON data, canonicalize it first (sort keys, strip whitespace).
Is SHA-1 still safe to use?
Not for security purposes. Researchers demonstrated the first practical SHA-1 collision in 2017 (the SHAttered attack), breaking the algorithm's collision-resistance guarantee. SHA-1 is still fine for non-security checksums where you control both ends, but prefer SHA-256 or SHA-512 for anything that must resist adversarial manipulation.
What does 'generate sha256 hash online' actually compute?
It runs the SHA-2 algorithm defined in FIPS 180-4 over the UTF-8 bytes of your input and returns a 256-bit (32-byte) digest expressed as 64 lowercase hex characters. The result is deterministic — the same input always produces the same hash, on any machine, in any browser.