Hash Generator

Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes for text or files. Everything runs in your browser.

MD5
—
SHA-1
—
SHA-256
—
SHA-384
—
SHA-512
—
Enter some text to generate hashes

About Cryptographic Hashes

A cryptographic hash function takes input data of any size and produces a fixed-size output (the hash/digest). The same input always produces the same output, but it is computationally infeasible to reverse the process or find two inputs with the same hash.

MD5 (128-bit)

Fast but cryptographically broken. Use only for checksums, not security.

SHA-1 (160-bit)

Deprecated for security. Still used for Git commit IDs and some checksums.

SHA-256 (256-bit)

Current standard. Used in TLS, Bitcoin, code signing, and password hashing.

How to generate a hash

  1. Choose Text to hash something you type or paste, or File to hash a file from your computer.
  2. MD5, SHA-1, SHA-256, SHA-384 and SHA-512 are calculated at once, so you don't need to pick one first.
  3. Toggle uppercase if you're comparing against a checksum published in capitals.
  4. Copy the hash you need, or compare it by eye with the one you were given.

What a hash is useful for

A hash function turns any input, whether a word or a 4 GB disk image, into a short fixed-length fingerprint. Change a single bit of the input and the fingerprint changes completely. That makes hashes ideal for answering one question: is this exactly the same data?

  • Verifying downloads. Software publishers list a SHA-256 checksum next to their installers. Hash the file you downloaded and compare: a match means it wasn't corrupted or tampered with. We explain how, step by step, in How to verify a download with a SHA-256 checksum.
  • Detecting duplicates. Two files with the same SHA-256 are, for all practical purposes, identical. Backup and sync tools rely on this.
  • Cache keys and ETags. Hash the content and use the result as a version identifier, so a cache refreshes only when the content actually changes.
  • Integrity in code. Subresource Integrity attributes, Git object IDs, package lock files and Docker image digests are all hashes.

Which algorithm should you use?

AlgorithmOutputStatus
MD5128 bits / 32 hex charsBroken: collisions can be crafted in seconds. Fine for spotting accidental corruption, never for security.
SHA-1160 bits / 40 hex charsBroken since the 2017 SHAttered attack. Still seen in Git and legacy systems.
SHA-256256 bits / 64 hex charsThe current default for checksums, signatures and certificates.
SHA-384384 bits / 96 hex charsSecure; common in TLS and Subresource Integrity (sha384-…).
SHA-512512 bits / 128 hex charsSecure, and often faster than SHA-256 on 64-bit processors.

If you're choosing for something new, use SHA-256. If you're checking a file, use whatever algorithm the publisher used. Comparing an MD5 against a SHA-256 tells you nothing.

Hashing is not encryption

This mix-up is common enough to be worth spelling out. Encryption is two-way: with the key, you get the original back. Hashing is one-way: there is no key and no "decrypt". And Base64, which people sometimes mistake for either, is neither. It's a reversible encoding with no secret at all (see our Base64 encoder).

Command-line equivalents

  • macOS: shasum -a 256 file.zip or md5 file.zip
  • Linux: sha256sum file.zip, md5sum file.zip
  • Windows PowerShell: Get-FileHash file.zip -Algorithm SHA256
  • Text, without the trailing newline: printf '%s' 'hello' | sha256sum

Frequently asked questions

Can a hash be reversed to get the original text?+

Not mathematically. But short or common inputs can be found by brute force or with precomputed lookup tables, which is why the MD5 of 'password123' is easy to 'reverse' with a web search. Hashes protect data only when the input is long and unpredictable.

Should I hash passwords with SHA-256?+

No. SHA-256 is designed to be fast, which helps attackers try billions of guesses per second. Passwords need a deliberately slow, salted algorithm such as Argon2id, scrypt or bcrypt, which your web framework almost certainly provides.

Why do I get a different hash than another tool for the same text?+

Almost always invisible differences in the input: a trailing newline (echo adds one unless you use -n), Windows CRLF line endings versus LF, or a different text encoding. This tool hashes the UTF-8 bytes of exactly what's in the box.

Is it safe to hash confidential files here?+

Yes. The file is read and hashed locally by your browser; it is never uploaded. SHA hashes use the browser's built-in Web Crypto API, and MD5 runs in JavaScript on your device.

Is there a file size limit?+

There's no fixed limit, but the whole file is loaded into memory, so files of several hundred megabytes can be slow or fail on devices with little RAM. MD5 is the slowest of the five because it runs in JavaScript rather than native code.

Last updated October 16, 2026