Hash Generator

Client-sideNo sign-upFree

Generate MD5, SHA-1, SHA-256, and SHA-512 hashes of any text, all at once.

Quick facts

Category
Encoders & Decoders
Best for
Verifying a downloaded file wasn't corrupted
Input text
✗ null
In-content slot
Was this tool helpful?

A hash function takes input of any length and produces a fixed-length "fingerprint" of it - the same input always produces the same output, but there is no way to reverse the output back into the input. This guide covers what each algorithm this tool supports is actually for, with a verified worked example.

On this page

What a hash is (and is not)

  • Deterministic: hashing the same input twice always gives the same output.
  • Fixed-length output: MD5 always outputs 128 bits (32 hex characters) regardless of whether the input is 3 bytes or 3 gigabytes; SHA-256 always outputs 256 bits (64 hex characters).
  • One-way: there is no algorithm to recover the original input from the hash alone - the only general approach is guessing inputs and re-hashing them to see if they match.
  • Avalanche effect: changing a single character of the input produces a completely different-looking hash, not a similar one.
Hashing is not encryption. Encryption is reversible with the right key; hashing is deliberately one-way. That is exactly why hashes are used for password storage and integrity checks - the system checking the hash never needs to recover the original value.

Worked example: hashing the same input four ways

Input text: "Formatiq makes dev tools fast." - hashed with each algorithm this tool supports (values computed and verified independently, not just illustrative):

AlgorithmOutput lengthHash (hex)
MD5128 bits / 32 hex chars74f0b219b39d4786a14012a3c35cb271
SHA-1160 bits / 40 hex chars4507be762d492b705741022e4b9e8d894ef97468
SHA-256256 bits / 64 hex charsa294309c79ea10cdbc9bda5438c672fee7a14a792f7bed8f02a3e42bef774393
SHA-512512 bits / 128 hex charsec3abdd29774c4c2dc2b82ec5d11f844530e3508d11a0c27b63157294506ea867a2dcddd33afaef3e2b7d560e264b41c044274e1b72a3180bb6e634919e22ee7
Notice the output length never changes with input length - hashing one character or one megabyte of text through SHA-256 always produces exactly 64 hex characters.

Which algorithm to use

AlgorithmStatusUse it for
MD5Broken for security use (collisions are practical to engineer)Non-security checksums only - e.g. quickly checking if a downloaded file matches a known-good copy
SHA-1Broken for security use (collisions demonstrated in practice since 2017)Legacy compatibility only (e.g. git object ids) - do not use for new security-sensitive work
SHA-256Currently considered secureGeneral-purpose integrity checks, digital signatures, blockchain, most new applications
SHA-512Currently considered secureSame use cases as SHA-256, with a larger output; can be faster on 64-bit hardware
None of these algorithms are appropriate for hashing passwords directly, "broken" or not - password hashing needs a deliberately slow, salted algorithm (bcrypt, scrypt, or Argon2) specifically designed to resist brute-force guessing, which general-purpose hashes like these are not.

Frequently asked questions

MD5 and SHA-1 are still common for non-security checksums like verifying a download completed without corruption or generating a quick cache key, since they’re fast and short. SHA-256 is the current standard for security-sensitive integrity checks, digital signatures, and blockchain applications. SHA-512 offers a larger output and is used where a longer digest is preferred, such as some password-hashing schemes and high-assurance protocols.

No - both have known collision vulnerabilities (researchers can construct two different inputs that produce the same hash), which makes them unsuitable for digital signatures, password storage, or any use case where an attacker might try to forge content that matches a given hash. They remain fine for non-adversarial purposes like checksums, but SHA-256 or SHA-512 should be used wherever security matters.

Hash functions are deterministic - they always produce identical output for identical input, and even a one-character change in the input produces a completely different hash. That determinism is exactly what makes hashes useful for verifying that two files or messages are byte-for-byte the same without comparing their full contents.

Explore more free tools

Formatters, converters, validators, and generators - all free and running entirely in your browser.

Browse more tools