Internative Logo

Hash Generator: MD5, SHA-1, SHA-256 and SHA-512 of Any Text

Hash Generator: MD5, SHA-1, SHA-256 and SHA-512 of Any Text

A hash is a fixed-length fingerprint of some data. The same input always gives the same hash, a tiny change in the input gives a completely different one, and you cannot work backwards from the hash to the input. The tool below takes your text and shows its MD5, SHA-1, SHA-256 and SHA-512 hashes at the same time. It runs in your browser and uses the UTF-8 bytes of your text, so what you paste is not sent anywhere.

Hash generator

Get the MD5, SHA-1, SHA-256 and SHA-512 hash of a text. The text is hashed as UTF-8.

MD5 and SHA-1 are broken for security purposes. Use SHA-256 or SHA-512 for anything that must resist tampering, and a password hashing function (bcrypt, scrypt, Argon2) for passwords.

What you enter never leaves your browser. Nothing is sent or stored.

How to use the generator

  1. Type or paste your text into the input field.
  2. Press Generate.
  3. Read the four hashes, each written in hexadecimal, and copy the one you need.

The result is deterministic. Hashing hello with SHA-256 always gives 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824, in this tool, in Node.js, in Python or on the command line. That is what makes hashes useful for comparing data.

What the four algorithms are for

  • MD5 (32 hex characters): quick checksums where nobody is attacking you, and matching an existing system that uses it.
  • SHA-1 (40): the same, for older systems. Avoid it for anything new.
  • SHA-256 (64): the sensible default for integrity checks and fingerprints.
  • SHA-512 (128): the same family with a longer output.

MD5 and SHA-1 are broken for security purposes: researchers can produce two different inputs with the same hash. They are fine for detecting accidental corruption, not for stopping a deliberate change.

Common uses

  • Checking that a downloaded file matches the checksum the publisher lists.
  • Detecting whether two pieces of content are identical without comparing them byte by byte.
  • Creating a stable key for caching or de-duplication.
  • Debugging an integration that signs or fingerprints payloads, by checking what the hash of a known string should be.

Small changes, different hashes

Hashes react to every character. The MD5 of hello is 5d41402abc4b2a76b9719d911017c592, while Hello gives 8b1a9953c4611296a827abf8c47804d7. A trailing newline also changes the result. If your hash does not match one from another tool, a hidden newline or space is the usual reason.

Mistakes to avoid

  • Treating a hash as encryption. A hash cannot be decrypted. Sites that offer to "decode" a hash only look it up in tables of known inputs, which works for common words and fails for strong ones.
  • Storing passwords with a plain fast hash. SHA-256 is too fast for this, which helps an attacker who steals the database try billions of guesses. Use a slow password hashing function such as bcrypt, scrypt or Argon2, with a salt.
  • Using MD5 or SHA-1 for security. Choose SHA-256 or better.
  • Hashing secrets and sharing the result. A hash of a short or guessable secret can be guessed back.

When hashing is part of a design

Choosing the right algorithm is a small decision inside a bigger one: how a system stores credentials, signs requests and proves that data was not changed. That is part of application security work, and data protection and privacy covers what happens to personal data around it.

Frequently asked questions

Does my text leave my browser?

No. The hashes are computed in the page on your device. The tool makes no network request with your text and does not store it.

Can a hash be decoded to get the original text?

No. A hash function is one-way and has no key. Lookup sites can only find inputs they have already hashed.

Which algorithm should I use?

SHA-256 for most new work. Use MD5 or SHA-1 only when a system you must match requires them and security is not at stake.

Why is my hash different from another tool's?

The input is different. Check for a trailing newline, extra spaces, a different character encoding or a different letter case.

Does the same text always give the same hash?

Yes, for a given algorithm. Only the text changes the result.

Related services

Where this topic becomes an engagement.

Keep reading

The articles that follow this one.