Skip to content

Hash Generator (MD5, SHA-1, SHA-256, SHA-512)

Generate MD5, SHA-1, SHA-256 and SHA-512 hex digests of any text in your browser. Nothing you type is uploaded or logged.

Runs entirely in your browser. Nothing you paste here is sent to us or anyone else โ€” there is no server processing, no logging of input, and no third-party scripts on this page.

A hash generator turns any text into a fixed-length fingerprint โ€” a hex digest โ€” using a one-way hash function, and this tool computes MD5, SHA-1, SHA-256 and SHA-512 side by side as you type. Enter text on the left and every digest updates live; each result has its own Copy button and the status line shows the byte length of your input. Everything runs in your browser: the SHA algorithms use the built-in Web Crypto API and MD5 uses a small bundled JavaScript routine, so nothing you type is ever uploaded, logged, or stored.

What is a cryptographic hash?

A hash function takes an input of any size and returns a fixed-size value called a digest or hash. The same input always produces the same digest, a tiny change in the input produces a completely different digest, and โ€” crucially โ€” you cannot work backwards from the digest to the original input. That one-way property is what makes hashes useful for verifying integrity: publish the hash of a file, and anyone can re-hash their copy to confirm it arrived unchanged.

The tool above hashes the exact UTF-8 bytes of your text. That detail matters: hashing is defined over bytes, not characters, so the encoding you use determines the result. Two tools that disagree on a digest almost always disagree on encoding or on a hidden trailing newline.

MD5 vs SHA-1 vs SHA-256 vs SHA-512

The four algorithms here differ mainly in digest length and in whether they are still considered secure:

Algorithm Digest length Hex characters Security status
MD5 128-bit 32 Broken โ€” collisions are practical
SHA-1 160-bit 40 Broken โ€” collisions are practical
SHA-256 256-bit 64 Secure (SHA-2 family)
SHA-512 512-bit 128 Secure (SHA-2 family)

A longer digest means more possible outputs, which makes an accidental collision โ€” two different inputs sharing a digest โ€” vanishingly unlikely. But length is not the whole story. MD5 and SHA-1 are broken not because they are short but because their internal design has been defeated: researchers can deliberately construct two different inputs with the same digest. SHA-256 and SHA-512 belong to the SHA-2 family and have no known practical collision attack. SHA-512 works on 64-bit words and is frequently faster than SHA-256 on modern 64-bit CPUs, despite producing a larger digest.

Important: what these hashes are not for

MD5 and SHA-1 must not be used for security. Because forging a collision is practical, they are unsafe for digital signatures, TLS certificates, software-signing, or anything where an attacker benefits from two inputs colliding. They remain perfectly fine for non-adversarial jobs: verifying that a download was not corrupted in transit, deduplicating files, or generating cache keys, where the only threat is accidental change.

No general hash โ€” not even SHA-256 or SHA-512 โ€” is password hashing. Password storage needs a deliberately slow, salted algorithm such as bcrypt, scrypt, or Argon2, run on the server. A plain fast hash of a password can be reversed with a wordlist in moments, and an unsalted hash lets identical passwords be spotted across users. If you are storing user passwords, reach for a password-hashing function with a per-user salt, not the digests on this page.

Common use cases

  • File integrity โ€” compare a download against a published SHA-256 checksum to confirm it was not corrupted or tampered with.
  • Deduplication โ€” hash records or files and treat matching digests as duplicates.
  • Cache keys and ETags โ€” derive a short, stable identifier from content that changes whenever the content does.
  • Content addressing โ€” reference a blob by its hash, the way Git identifies commits and objects.

A worked example

Type abc into the tool and you will get the MD5 digest 900150983cd24fb0d6963f7d28e17f72 and the SHA-256 digest ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. Change a single character โ€” say to abd โ€” and both digests change completely, with no resemblance to the originals. That avalanche effect is exactly why hashes are good at detecting even the smallest change to a file or message.

Runs entirely in your browser

This tool makes no network requests. SHA-1, SHA-256 and SHA-512 are computed with crypto.subtle.digest, the browser’s native cryptography, and MD5 is computed by a compact routine included in the page because MD5 is not part of the Web Crypto standard. You can load the page, disconnect from the internet, and every digest still generates instantly โ€” a good habit for any input you would rather not send across a network.

Frequently asked questions

Is my input sent to a server?

No. Every digest is computed on your device. SHA-1, SHA-256 and SHA-512 use the browser's built-in Web Crypto API, and MD5 uses a small pure-JavaScript routine bundled with the page. Nothing you type is uploaded, logged, or stored, and the tool keeps working with the network disconnected.

Should I use this to hash passwords?

No. A general cryptographic hash like SHA-256 is not password hashing. Passwords need a slow, salted algorithm such as bcrypt, scrypt, or Argon2, run on your server. A plain fast hash of a password can be brute-forced with a wordlist almost instantly, so never store user passwords as MD5 or SHA-256.

Are MD5 and SHA-1 safe to use?

Not for security. Both are broken: practical collision attacks exist, so they must not be used for digital signatures, certificates, or anything where an attacker could forge input. They remain fine for non-adversarial checksums and deduplication, where you only care that accidental corruption is detected.

What is the difference between MD5, SHA-256 and SHA-512?

They differ in output length and design. MD5 produces a 128-bit digest, SHA-1 produces 160 bits, SHA-256 produces 256 bits, and SHA-512 produces 512 bits. Longer digests make accidental collisions astronomically unlikely; MD5 and SHA-1 are also weak by design, while SHA-256 and SHA-512 (the SHA-2 family) have no known practical collision attacks.

Why is my digest different from another tool?

Almost always a text-encoding difference. This tool hashes the exact UTF-8 bytes of what you type. A tool that uses a different encoding (Latin-1, UTF-16) or that appends a trailing newline will produce a different digest for the same visible text. Non-ASCII characters are the usual culprit.

Is SHA-512 more secure than SHA-256?

SHA-512 has a larger 512-bit output and, perhaps surprisingly, is often faster than SHA-256 on 64-bit hardware because it works on 64-bit words. Both are considered secure. SHA-256 is the more common default; SHA-512 is a good choice when you want the extra output size or better throughput on 64-bit systems.

Can I get the same hash back as text?

No. Hashing is one-way by design โ€” you cannot reverse a digest to recover the input. Sites that appear to "decrypt" MD5 are just looking values up in a precomputed table of common strings, which is exactly why salting matters for anything sensitive.

What can I actually use these hashes for?

Verifying that a downloaded file matches a published checksum, detecting whether two pieces of content are identical, deduplicating records, generating cache keys or ETags, and building content-addressed identifiers. For any of these, pick SHA-256 unless you have a specific reason to match an existing MD5 or SHA-1 checksum.