ruxox
Start
Start
Crypto / Hashing

Hash Generator

Hash any string with SHA-1, SHA-256, or SHA-512 using the browser Web Crypto API. No server, no tracking. Results update as you type.

Hash Generator

Runs entirely in your browser — no server calls, no tracking.

Click Hash to generate.

🔒 Your data never leaves this tab. This tool has no backend.

About this tool

About the Hash Generator

A cryptographic hash function takes an input of any length and produces a fixed-length output (the "digest") that is deterministic — the same input always produces the same hash — and practically irreversible — you cannot reconstruct the input from the hash alone. This tool uses the browser's built-in Web Crypto API (crypto.subtle.digest) for all computation. Nothing is sent to any server.

SHA-256 vs SHA-512

SHA-256 produces a 256-bit (32-byte, 64 hex character) digest. SHA-512 produces a 512-bit (64-byte, 128 hex character) digest and is marginally more collision-resistant, though SHA-256 is already considered secure for all practical purposes. Use SHA-512 in systems where future quantum attack resistance is a consideration, or when operating under compliance standards that mandate it.

Why MD5 is excluded

MD5 is not supported by the Web Crypto API because it is cryptographically broken — MD5 collisions can be generated in seconds on consumer hardware. If you need to verify a legacy MD5 checksum, use a local tool. For any new security-relevant use (data integrity, password hashing steps, API signatures), use SHA-256 or stronger.

Note: this tool hashes strings, not files. For file hashing, use sha256sum (Linux/macOS) or Get-FileHash (PowerShell). For password hashing in applications, use a dedicated password hash function (bcrypt, Argon2, scrypt) — not raw SHA. Raw SHA hashes of passwords are fast to brute-force; bcrypt and Argon2 are deliberately slow.

Hashing

MD5, SHA-1, SHA-256 — and hashing passwords properly

A hash turns any input into a fixed-length fingerprint. The same input always gives the same output, and the process cannot be reversed. What differs between algorithms is how hard it is to engineer a collision.

AlgorithmLengthUse for
MD5128-bitNon-security checksums only — broken
SHA-1160-bitLegacy compatibility only — broken
SHA-256256-bitThe sensible default
SHA-512512-bitWhere a longer digest is required

MD5 and SHA-1 are both broken for security purposes: attackers can construct two different inputs with the same hash. They remain fine for detecting accidental corruption — verifying a download completed intact — but never for signatures, integrity guarantees against a motivated attacker, or passwords.

Password hashing is a different job

A password hash generator should not use these algorithms at all. SHA-256 is designed to be fast, which is exactly wrong for passwords: it lets an attacker with a stolen database try billions of guesses per second. Password hashing needs a deliberately slow, salted algorithm — bcrypt, scrypt or Argon2 — with a unique random salt per user so identical passwords produce different hashes and precomputed rainbow tables are useless. Those run server-side, never in a browser.

Verifying a download

Publishers list a SHA-256 checksum next to their files. Hash the file you received and compare: identical means the bytes arrived intact. This catches corruption reliably, and tampering only if you trust the source of the published checksum.

FAQ

Frequently asked questions

Which hash algorithm should I use?

SHA-256 for almost everything. MD5 and SHA-1 are cryptographically broken — attackers can construct two different inputs with the same hash — so use them only for detecting accidental file corruption, never for security. SHA-512 where a longer digest is specifically required.

How should I hash passwords?

Not with MD5, SHA-1 or SHA-256. Those are built to be fast, which lets an attacker with a stolen database try billions of guesses per second. Use bcrypt, scrypt or Argon2 with a unique random salt per user. These are deliberately slow and must run on your server, not in a browser.

What is a salt and why does it matter?

A salt is a unique random value stored alongside each password hash and mixed in before hashing. It means two users with the same password get different hashes, and it makes precomputed rainbow tables useless. Modern password hashing functions like bcrypt and Argon2 handle salting for you.

Can a hash be reversed back to the original text?

No — hashing is one-way by design. But short or common inputs can be found by brute force or looked up in precomputed tables, which is why unsalted hashes of passwords offer so little protection. A hash is a fingerprint, not encryption.

How do I verify a downloaded file with a checksum?

Hash the file you downloaded and compare the result to the checksum the publisher lists, character for character. If they match, the file arrived intact. This reliably catches corruption; it only detects tampering if you trust where the published checksum came from.

Why should I not use SHA-256 for password hashing?
SHA-256 is designed to be fast — a modern GPU can compute billions of SHA-256 hashes per second, making brute-force attacks trivial. Password hashing functions like bcrypt, Argon2, and scrypt are deliberately slow (configurable work factor) and include salt to prevent rainbow table attacks. Always use one of these for storing user passwords, never raw SHA.
What is a hash collision?
A collision occurs when two different inputs produce the same hash output. For SHA-256, no collision has ever been found — the search space is 2²⁵⁶, which is computationally infeasible. For MD5, collisions can be generated in seconds, which is why it is broken for security use. For SHA-1, theoretical collisions have been demonstrated (SHAttered attack, 2017).
Can I use this to verify file integrity?
This tool hashes text strings. To hash a file, use your OS: sha256sum filename on Linux/macOS or Get-FileHash filename -Algorithm SHA256 in PowerShell. You can then paste the resulting hash here and compare it to the expected value to verify integrity.
What is HMAC and how does it differ from a plain hash?
HMAC (Hash-based Message Authentication Code) combines a hash function with a secret key. A plain hash verifies data integrity — it tells you the data has not changed. An HMAC also verifies authenticity — only someone with the secret key could have produced the code. Use HMAC for API request signing, webhook verification, and cookie tampering detection.
Custom software

Need secure API authentication built?

ruxox builds custom APIs with HMAC signing, rate limiting, and key management. Free estimate in 48 hours.

Free project estimateNo obligation · reply in 48h
Get estimate