Free String Hash Visualiser

Enter text to compute and visually compare MD5, SHA-1, SHA-256 and SHA-512 hashes with colour blocks.

How It Works

  1. Enter your text: Type or paste any string, a password, file content, identifier, or any text you want to hash.
  2. Choose an algorithm: Select MD5, SHA-1, SHA-256, SHA-384, or SHA-512 depending on your use case.
  3. Copy the hash: The hash value appears instantly. Copy it for storage, comparison, or verification.

Why Use String Hash Generator?

Hashing converts any string into a fixed-length fingerprint that is unique to its content. Even a one-character change produces a completely different hash. This is essential for verifying data integrity, storing passwords securely, generating cache keys, deduplicating records, and creating content-based identifiers. Because hashing is one-way, you cannot reverse a hash to get the original text, making it safe for storing sensitive data.

Features

Frequently Asked Questions

Which hash algorithm should I use?

For security-sensitive applications (passwords, signatures), use SHA-256 or SHA-512. MD5 and SHA-1 are deprecated for security but still useful for checksums and cache keys where cryptographic strength is not required.

Can I use this to hash passwords for storage?

String hashing gives you a one-way hash, but for password storage you should use a key-derivation function like bcrypt, Argon2, or PBKDF2 that incorporates salting and iteration. Simple SHA hashes are too fast and vulnerable to rainbow table attacks.

Are hashes reversible?

No. Hash functions are one-way, you cannot recover the original string from its hash. If two strings produce the same hash (a collision), that is a flaw in the algorithm. SHA-256 and SHA-512 have no known practical collisions.

A 35-year history of hash functions: from MD5 to BLAKE3

Cryptographic hash functions evolved through a long sequence of break-and-replace cycles. MD5 was published by Ronald Rivest in RFC 1321 (April 1992) as a successor to MD4. Its 128-bit output was considered strong enough for over a decade until Wang and Yu published the first practical collision in 2004. By 2008, researchers had used MD5 collisions to forge a rogue SSL certificate authority. SHA-1 was designed by the NSA and standardised by NIST in FIPS 180-1 (1995). Its 160-bit output stood until February 2017, when Google and CWI Amsterdam announced the SHAttered attack, producing two PDFs with the same SHA-1 hash. Costs: about 6,500 CPU-years equivalent on GPUs. SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512), also from the NSA, was published in FIPS 180-2 (August 2002). It uses the same Merkle-Damgård construction as SHA-1 but with larger states and more rounds; no practical attack exists on the full versions today. SHA-3 (Keccak, by Bertoni et al.) was selected by NIST after a public competition and standardised in FIPS 202 (August 2015). SHA-3 uses a completely different sponge construction, immune to the length-extension attacks that affect SHA-2. Outside the NIST family, BLAKE2 (Aumasson et al., 2012) and BLAKE3 (2020) offer SHA-3-class security with the speed of MD5; BLAKE3 hashes a 1 GB file in about a second on a modern laptop.

Which algorithm to pick: a quick decision table

Where hashing actually gets used

Hashing mistakes that lose money or break things

More frequently asked questions

Why are MD5 and SHA-1 «broken» if they still produce hashes?

«Broken» means an attacker can produce collisions faster than brute force. For MD5, finding two inputs with the same hash takes seconds on a laptop today. For SHA-1, it took 6,500 CPU-years in 2017 and has dropped dramatically since. The hashes still work mechanically; what's broken is the security guarantee that they are «collision-resistant». For non-adversarial uses (checksumming a file you trust against accidental corruption) MD5 still works fine. For anything involving an adversary, both are unsafe.

Should I worry about quantum computers breaking SHA-256?

Less than you might think. Grover's algorithm speeds up preimage attacks against a 256-bit hash from 2²⁵⁶ to 2¹²⁸ classical-equivalent work, which is still effectively impossible. Symmetric primitives (hashes, AES) survive quantum computing by doubling key/output sizes. Public-key crypto (RSA, ECDSA) is what falls hard to quantum attacks, hence the NIST post-quantum standards published in August 2024 (ML-KEM, ML-DSA, SLH-DSA). If you are using SHA-256 today, SHA-512 in the post-quantum era will be more than enough.

What's the difference between a hash and HMAC?

A hash (SHA-256) is keyless: anyone with the input can compute the same output. An HMAC (Hash-based Message Authentication Code) wraps the hash with a secret key, so only someone knowing the key can compute or verify the tag. Defined in RFC 2104 (1997), HMAC is the standard way to «sign» a message symmetrically (sender and receiver share a secret). Use HMAC-SHA256 for webhook signatures, JWT HS256, API request signing. Plain SHA-256 on secret + message is unsafe due to length-extension.

Why do different libraries give different hashes for the same string?

Three common causes. First, character encoding: UTF-8 vs UTF-16 vs Latin-1 give different bytes for non-ASCII strings, hence different hashes. Always encode explicitly. Second, line endings: "hello\n" and "hello\r\n" hash differently; Windows-vs-Unix file checksums often differ for this reason. Third, output format: lowercase hex vs uppercase hex vs base64 looks like a different value but represents the same bytes. Normalise input and output formats before comparing.

Is my input sent to a server when I hash here?

No. All four hashes are computed in your browser using the built-in Web Crypto API (crypto.subtle.digest). Open the Network tab in DevTools and type into the input, you will see zero outbound requests. Safe for credentials, tokens, or any private value you want to hash without it leaving your device.

Related Tools

Hash Generator JWT Generator UUID Generator Base64 Encoder