Hash Generator

Calculate the MD5, SHA-1, SHA-256 or SHA-512 hash of any text.

What is a hash

A hash is the result of a mathematical function that transforms a text of any length into a fixed-length sequence (a "fingerprint" of the content). The smallest change to the original text produces a completely different hash, and it's not possible to reverse the hash to get the original text.

Differences between the algorithms

MD5 (128 bits) and SHA-1 (160 bits) are considered cryptographically broken for security purposes (collisions can be generated), but are still widely used to check file integrity. SHA-256 and SHA-512 (from the SHA-2 family) are the current recommended standards for security, used in digital certificates, blockchain and password verification.

Common uses

Verifying that a downloaded file wasn't corrupted or tampered with (comparing against the hash published by the official site), generating deterministic identifiers from a text, or studying how hash functions work.

How it's calculated

SHA-1, SHA-256 and SHA-512 are calculated using the browser's native crypto.subtle API (Web Crypto API); MD5 uses a JavaScript implementation, since it isn't part of the browser's native API. All calculation happens locally, without sending the text to any server.

Frequently asked questions

Can the original text be recovered from the hash?

Not directly — hashing is a one-way function. It is possible, however, to try to "break" weak hashes (like MD5) through brute force or precomputed lookup tables (rainbow tables) for short, predictable texts like common passwords.

Which algorithm should I use to store passwords?

None of these directly — for passwords, the recommended approach is a purpose-built function like bcrypt, scrypt or Argon2, which are intentionally slow to make brute-force attacks harder. MD5/SHA are too fast for that use case.