Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes or HMACs from text and files and verify checksums — computed locally with Web Crypto.
Paste an expected hash (hex in any case, or Base64). It is compared against every digest above.
What is the Hash Generator?
This Hash Generator computes MD5, SHA-1, SHA-256, SHA-384 and SHA-512 digests of text, raw bytes (hex or Base64) or whole files directly in your browser. SHA hashes use the built-in Web Crypto API; MD5, which Web Crypto does not provide, is computed by a local JavaScript implementation that works on the raw bytes, so results match command-line tools such as md5sum and sha256sum byte for byte.
Text is encoded as UTF-8 before hashing, which means emoji and other non-ASCII characters produce the same digest as in Python, Node.js, PHP or Go. Switch to HMAC mode to compute keyed hashes (HMAC-MD5, HMAC-SHA-1, HMAC-SHA-256, HMAC-SHA-384, HMAC-SHA-512) for signing webhooks or API requests, choose hex, uppercase hex or Base64 output, and paste an expected checksum to verify a download.
Hashes are one-way fingerprints: any change to the input — even a single bit or a trailing newline — produces a completely different value. Nothing you type or drop on this page is uploaded; files are read into memory locally and never leave your device.
Frequently asked questions
- What is a cryptographic hash?
- A hash function maps input of any size to a fixed-length digest (128 bits for MD5, 256 bits for SHA-256, and so on). The same input always yields the same digest, while even a one-character change produces a completely different one, which makes hashes ideal for integrity checks.
- Why does my hash differ from the command line?
- Usually because the inputs are not byte-identical. `echo "text" | sha256sum` hashes a trailing newline, Windows files may use CRLF line endings, and some tools hash UTF-16 instead of UTF-8. Use the Hex bytes input or hash the file itself for an exact comparison.
- Should I use MD5 or SHA-1?
- Only for non-security purposes such as checksums or cache keys. Both are broken for collision resistance: attackers can craft different inputs with the same digest. Use SHA-256 or SHA-512 for anything security-related.
- Can I store passwords as SHA-256 hashes?
- No. General-purpose hashes are designed to be fast, which makes brute-forcing leaked password hashes cheap. Store passwords with a dedicated, salted and slow algorithm such as Argon2id, scrypt or bcrypt instead.
- What is HMAC?
- HMAC (RFC 2104) combines a secret key with a hash function to produce a message authentication code. Services like GitHub, Stripe or Slack sign webhooks with HMAC-SHA-256 so the receiver can check that a payload is authentic and unmodified.
- Is hashing the same as encryption?
- No. Encryption is reversible with the right key, while hashing is a one-way function: there is no key that turns a digest back into the original input.
- Are my files uploaded?
- No. Files are read with the browser's File API and hashed locally; this page makes no network requests with your data. Very large files must fit in memory, so multi-gigabyte files may fail on devices with little RAM.
Related tools
- JSON FormatterFormat, validate, minify and explore JSON with precise error locations. Your data never leaves the browser.
- JSON to TypeScriptPaste JSON and instantly generate TypeScript interfaces or type aliases with nested types, optional fields and arrays. Free and offline.
- Regex TesterTest and debug JavaScript regular expressions with live match highlighting, capture groups, flags and replace preview.
- UUID / ULID GeneratorGenerate cryptographically random UUID v4, time-ordered UUID v7, ULID and Nano ID identifiers in bulk, and inspect or convert existing IDs — locally in your browser.
- JWT DecoderDecode JWT header and payload, check expiry, and verify HS, RS, PS, ES and EdDSA signatures locally with Web Crypto — your token never leaves the browser.
- SQL FormatterFormat and beautify SQL queries for MySQL, PostgreSQL, SQLite, SQL Server and more with configurable indentation and keyword case.