Hash Generator
About this tool
About Hash Generator
Type or paste text and get its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 digests side by side, updated as you type. Text is hashed as UTF-8, the same bytes that most programming languages and command-line tools hash, so the results match echo -n, Python's hashlib and Node's crypto. You can also hash raw bytes by switching Input is to Hex bytes or Base64. Show the output as lowercase hex, uppercase HEX, Base64 or Base64URL. Turn on HMAC to compute keyed hashes for webhook signatures and API request signing, with the key as text, hex or Base64. Paste a published checksum into Compare with expected hash and the matching algorithm lights up, ignoring case and spaces. SHA hashes use your browser's Web Crypto and MD5 a bundled library, so the text never leaves your device. For large files, use the File Checksum Calculator, which reads them in chunks.
Built and maintained by Abhi JainUpdated
How to Generate a Hash
- 1
Enter the text
Type or paste into Text to hash, or click Sample. Switch Input is to Hex bytes or Base64 for binary data.
- 2
Choose the output
Pick hex, HEX, Base64 or Base64URL. Tick HMAC (keyed hash) and enter a Secret key if you need an HMAC.
- 3
Copy or compare
Copy any digest, or paste a known value into Compare with expected hash to see which algorithm matches.
Hash Generator: questions and answers
Why doesn't my hash match the one from another tool?
Almost always the input bytes differ. Common causes are a trailing newline (echo adds one unless you use echo -n), a different text encoding than UTF-8, Windows CRLF line endings, or a hex string being hashed as text instead of as bytes.
Can a hash be reversed to get the text back?
No. Hash functions are one-way. Short or common inputs can be found by guessing and comparing (lookup tables), which is why passwords must be stored with a slow, salted hash such as bcrypt or Argon2, not plain SHA-256 or MD5.
Is MD5 still safe to use?
Not for security. Practical collision attacks on MD5 have existed since 2004 and on SHA-1 since 2017. They are still fine for non-adversarial checksums and cache keys. Use SHA-256 or stronger for signatures, integrity checks against attackers and new designs.
What is HMAC and when do I need it?
HMAC (RFC 2104) mixes a secret key into the hash so only someone with the key can produce or check it. Webhooks from services like payment gateways sign their payloads with HMAC-SHA256, and you verify them by recomputing it with your secret.
What is the difference between SHA-256 and SHA-512?
Both are SHA-2. SHA-256 gives a 256-bit (64 hex character) digest and SHA-512 a 512-bit (128 hex character) one. SHA-512 is often faster on 64-bit CPUs; SHA-256 is the more widely expected default.
Ready-made Hash Generator presets
Related Tools
- File Checksum CalculatorMD5, SHA-1, SHA-256, SHA-384 and SHA-512 of any file, checked against the published hash.
- JWT GeneratorCreate and sign JWTs with HS, RS, PS, ES or EdDSA, with one-click exp and iat claims.
- Base64 EncoderEncode and decode Base64 for text and files, with URL-safe, MIME and data URL options.
- Password GeneratorStrong random passwords with a live strength and entropy estimate.
- UUID GeneratorGenerate UUID v4 or time-ordered v7 in bulk, and validate or decode any UUID.