Hash Generator
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes using the browser's built-in Web Crypto API. Supports text, HMAC, and file hashing: nothing is uploaded.
Free online hash generator: SHA-256, SHA-512, HMAC and file hashing
Cryptographic hashes are used throughout software development: verifying file downloads, storing passwords securely, signing API requests, generating checksums for cache keys, and creating digital signatures. This tool uses the browser's built-in Web Crypto API to compute SHA-1, SHA-256, SHA-384, and SHA-512 hashes simultaneously for any text or file you provide.
HMAC mode enables keyed hashing for message authentication: paste your message and secret key to get the same HMAC output that webhook services, payment gateways, and JWT libraries generate server-side. Because everything runs in the browser, sensitive inputs like API keys or private data never leave your machine.
Step-by-step guide
- 1Choose Text or File mode
Use the Text tab to hash a string or the File tab to generate hashes for any local file. - 2Enter your input
Type or paste text into the input area. For files, drop a file onto the drop zone or click Browse to select one. - 3Optionally enable HMAC
Tick HMAC mode and enter a secret key to generate keyed hashes for message authentication. - 4Choose Hex or Base64 output
Switch between hex (default) and Base64 representations of the hash using the format toggle. - 5Copy any hash
Each algorithm row has its own Copy button so you can grab the specific hash you need.
Related Tools
JSON Formatter
Validate, format, minify, and explore JSON. Syntax highlighting, error detection, and tree view.
SQL Formatter
Format SQL queries with keyword casing, indentation, and clause alignment.
Regex Tester
Test regular expressions with live matching, group capture, flags, and match highlighting.
Base64
Encode and decode Base64 strings and files. Supports text, binary, and data URLs.
Frequently Asked Questions
- Which hash algorithms does this tool support?
- The tool supports SHA-1, SHA-256, SHA-384, and SHA-512: all four algorithms exposed by the browser's Web Crypto API. All four hashes are computed simultaneously and displayed in a table.
- Why is MD5 not available?
- MD5 is not implemented in the browser's built-in Web Crypto API because it is considered cryptographically broken. For data integrity checking (not security), use SHA-256 instead.
- Is my data sent to a server?
- No. All hashing is performed using the browser's native crypto.subtle API. Neither text nor file data leaves your device.
- What is HMAC mode?
- HMAC (Hash-based Message Authentication Code) combines a cryptographic hash with a secret key to produce a signature that verifies both data integrity and authenticity. It is used in API authentication, JWT signing, and webhook verification.
- What is the difference between SHA-256 and SHA-512?
- SHA-256 produces a 256-bit (32-byte) hash and SHA-512 produces a 512-bit (64-byte) hash. SHA-512 is stronger and harder to brute-force but produces a longer output. For most web applications SHA-256 is sufficient.
- Can I hash a file to verify its integrity?
- Yes. Use the File tab, drop or select any file, and the tool computes SHA-1, SHA-256, SHA-384, and SHA-512 hashes. Compare the SHA-256 hash against the checksum published by the software distributor to verify the file has not been tampered with.
- What is the hex format?
- Hex (hexadecimal) represents each byte of the hash as two lowercase hex characters (0–9, a–f). SHA-256 in hex is 64 characters long. It is the most common format for displaying cryptographic hashes.
- What is the Base64 format?
- Base64 represents the raw binary hash bytes as ASCII text. It is more compact than hex (SHA-256 in Base64 is 44 characters) and is commonly used in HTTP headers, JWTs, and API responses.
- Does the hash change if I add a space to the input?
- Yes. Cryptographic hash functions are deterministic and sensitive to every byte of input. Adding, removing, or changing any character: including whitespace: produces a completely different hash output.
AlteredIdea vs alternatives
vs server-side tools: Everything runs in your browser: your data never leaves your device.
vs VS Code extensions: No install needed. Works instantly in any browser.
vs paid tools: Completely free, no account required.