Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes instantly. All hashing happens locally in your browser.
What is a Hash Generator?
A hash generator applies a cryptographic hash function to input data and produces a fixed-length hexadecimal digest. Hash functions are one-way — the same input always produces the same output, but you cannot reverse the hash to recover the original data. Commonly supported algorithms include MD5, SHA-1, SHA-256, and SHA-512. SHA-256 and SHA-512 are recommended for security-sensitive applications; MD5 and SHA-1 are considered cryptographically broken for collision resistance but remain widely used for checksums and non-security purposes.
Common Use Cases
- Verify file integrity by comparing checksums before and after download or transfer
- Store password hashes in a database instead of plaintext credentials
- Generate cache keys or ETags from content for HTTP caching
- Create deterministic IDs from content (content-addressable storage)
- Sign API requests using HMAC (Hash-based Message Authentication Code)
How It Works
This tool uses the browser's native SubtleCrypto API (crypto.subtle.digest()) for SHA-family algorithms, providing hardware-accelerated hashing without any server round-trips. MD5 is computed with a pure-JavaScript implementation since it is not part of the Web Crypto standard. Input is UTF-8 encoded before hashing; the raw bytes are then converted to a lowercase hex string.
Frequently Asked Questions
Should I use MD5 or SHA-256 for checksums?
SHA-256 is preferred for anything security-related because MD5 is vulnerable to collision attacks. For non-security checksums (detecting accidental data corruption), MD5 is fast and still reliable.
Can two different inputs produce the same hash?
Yes — this is called a "collision." Modern algorithms like SHA-256 make finding collisions computationally infeasible. MD5 and SHA-1 have known collision vulnerabilities, which is why they are not recommended for digital signatures or certificates.
Is hashing the same as encryption?
No. Hashing is one-way and cannot be reversed. Encryption is two-way — data can be decrypted with the correct key. Use hashing for integrity checks and storing passwords (with a salt); use encryption when you need to recover the original data.
Related Tools
Base64 Encoder
Encode and decode strings using Base64 encoding.
JWT Decoder
Decode and inspect JSON Web Tokens securely in your browser.
URL Encoder
Encode and decode URLs with percent-encoding instantly.
JSON Formatter
Format, validate, and minify JSON data instantly.
Unix Timestamp
Convert Unix timestamps to human-readable dates and back instantly.
JSON ↔ YAML
Convert between JSON and YAML instantly with real-time validation.
Regex Tester
Test and debug regular expressions with live match highlighting.
UUID Generator
Generate UUID v4 values instantly, with bulk generation and validation.
JWT Generator
Build and sign JSON Web Tokens with a custom payload and secret.
Text Diff
Compare two blocks of text and highlight additions, deletions, and unchanged lines.
Case Converter
Convert text to camelCase, snake_case, UPPERCASE, kebab-case, and more.
Cron Parser
Parse cron expressions into plain English and see the next scheduled run times.
SQL Formatter
Format and minify SQL queries with dialect support for MySQL, PostgreSQL, SQLite, and more.
CSV ↔ JSON
Convert CSV to JSON or JSON to CSV with support for custom delimiters and quoted fields.
Number Base Converter
Convert between decimal, hexadecimal, octal, and binary number bases.
Color Converter
Convert colours between HEX, RGB, HSL, HSV, and CMYK formats.
About these algorithms: SHA-256 and SHA-512 are recommended for security use. MD5 and SHA-1 are considered cryptographically broken and should only be used for checksums or legacy compatibility.
SHA hashes use the browser's native Web Crypto API. MD5 runs via a pure JavaScript implementation. Nothing leaves your browser.