Hash Generator
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from any text. Verify hashes by pasting and comparing.
SHA-1 vs SHA-256 vs SHA-512 — which to use?
| Algorithm | Output | Status | Use for |
|---|---|---|---|
| SHA-1 | 40 hex chars | Deprecated | Legacy checksums only (avoid for security) |
| SHA-256 | 64 hex chars | Secure ✓ | File integrity, digital signatures, TLS, JWTs |
| SHA-384 | 96 hex chars | Secure ✓ | High-security applications, government standards |
| SHA-512 | 128 hex chars | Secure ✓ | Maximum security, large file integrity |
Generating hashes in code
// JavaScript (browser + Node 15+)
const data = new TextEncoder().encode("hello world");
const buf = await crypto.subtle.digest("SHA-256", data);
const hex = Array.from(new Uint8Array(buf))
.map(b => b.toString(16).padStart(2, "0")).join("");
// Node.js — synchronous
const { createHash } = require("crypto");
createHash("sha256").update("hello world").digest("hex");
// Python
import hashlib
hashlib.sha256(b"hello world").hexdigest()Common developer use cases
- File integrity verification — hash a downloaded file and compare against the publisher's checksum to confirm it was not tampered with.
- API request signing — HMAC-SHA256 signs API payloads so the server can verify the request body was not modified in transit.
- Content addressing — Git, Docker, and IPFS identify objects by their hash rather than by name, enabling deduplication and tamper detection.
- Etag generation — hash response bodies to generate ETags for HTTP cache validation.
Related Tools
Frequently Asked Questions
What hash algorithms does this tool support?
This tool generates SHA-1, SHA-256, SHA-384, and SHA-512 hashes using the Web Crypto API built into your browser. All computation happens client-side.
Is it safe to hash sensitive data here?
Yes. All hashing happens entirely in your browser using the Web Crypto API. No data is sent to any server. Your text never leaves your device.
Can I verify a hash against my text?
Yes. Paste a hash in the verification field and the tool will instantly tell you which algorithm matches, or if there's no match.
What is the difference between SHA-256 and SHA-512?
SHA-256 produces a 256-bit (64 character hex) hash, while SHA-512 produces a 512-bit (128 character hex) hash. SHA-512 is more secure but produces longer output. Both are part of the SHA-2 family.