Hash Generator

Generate MD5, SHA-1, SHA-256 and SHA-512 hashes of any text in hex and Base64, and check a hash against an expected value.

Runs in your browser. Nothing is uploaded.

SHA-256
Hex

Base64

All algorithms
MD5—
SHA-1—
SHA-256—
SHA-384—
SHA-512—

Hashing a file? Use the File Checksum tool.

How to use the Hash Generator

  1. Choose an algorithm with the switch at the top - MD5, SHA-1, SHA-256 or SHA-512.
  2. Type or paste text into the box, or press Load example. The hash appears as you type, in hex and Base64.
  3. Tick Uppercase to match the format of the system you're comparing with.
  4. Paste an expected hash in the compare box to check for a match. If it's from another algorithm, the tool tells you which.
  5. Open All algorithms to see every hash of the same text at once.

One page for every common hash

A hash function turns any text into a short, fixed-length fingerprint. The same input always gives the same hash, and the smallest change gives a completely different one. That makes hashes ideal for checking that a file or message hasn’t changed, for building cache keys, for matching records without sharing the raw values, and for signing API requests. This generator covers the four algorithms you meet most often. Pick one with the switch, and the hash updates as you type.

The algorithms

  • SHA-256 is the default of the modern internet. HTTPS certificates are signed with it, package managers and Git-style tools identify content with it, and APIs use it in HMAC signatures. It gives 64 hex characters.
  • SHA-512 is the larger member of the same SHA-2 family, with 128 hex characters. It is just as secure and often faster on 64-bit machines.
  • SHA-1 gives 40 hex characters. It is still used for legacy checksums and in the “first five characters” password breach check, but no longer for signatures.
  • MD5 gives 32 hex characters and is the fastest. It is fine for cache keys, ETags and spotting accidental corruption, and is still common next to downloads.

Compare with an expected hash

Paste a hash from a download page, a log or another system into the compare box. A green match means the input is identical. If there’s no match, the tool looks at the length of what you pasted: 32 characters is MD5, 40 is SHA-1, 64 is SHA-256 and 128 is SHA-512, so you’ll know straight away when you’re comparing against the wrong algorithm. Spaces and colons in the pasted hash are ignored.

Hex, Base64 and uppercase

The hex form is what most tools print. Base64 is shorter and appears in HTTP headers, Subresource Integrity attributes and some APIs. Tick Uppercase when the system you’re matching prints capital hex letters; the value itself is the same.

Everything runs in your browser, so you can hash API keys, emails or internal IDs without sending them anywhere. To hash a whole file, use the File Checksum tool, and for keyed signatures use the HMAC Generator.

Frequently asked questions

Which algorithm should I use?

SHA-256 for anything new: checksums, signatures, API request signing and content IDs. SHA-512 when a system asks for it or you want a longer digest. MD5 and SHA-1 only to match older systems, cache keys or published checksums, because both are broken for security.

Why are MD5 and SHA-1 called broken?

Researchers can create two different inputs with the same MD5 or SHA-1 hash. That makes them unsafe for signatures and certificates. They still detect accidental changes perfectly well, which is why you still see them next to downloads and in caches.

Why does the same text give a different hash somewhere else?

Any difference in input changes the hash completely: a capital letter, a trailing space or a newline at the end. Normalise text first, for example by trimming spaces and lowercasing emails, as advertising platforms require for hashed customer lists.

Can a hash be reversed?

No, hashes are one-way. But short or predictable inputs, such as common passwords or phone numbers, can be guessed and checked, so hashing alone doesn't anonymise personal data. For storing passwords use bcrypt, scrypt or Argon2, which are deliberately slow.

Is my text uploaded?

No. SHA hashes are calculated with your browser's Web Crypto API and MD5 with a small built-in function. Nothing leaves the page.

Tutorials