Hash generator

Calculate MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 for text and files, optionally as HMAC – and verify download checksums in one click.
  • Free
  • No sign-up
  • Your data stays on your device

Text and files are processed only in your browser and never uploaded – large files included.

The text is hashed as UTF-8, with line breaks as LF (\n). On the command line, echo adds a trailing newline – use echo -n or printf to compare.

Paste the expected hash – a line from a sha256sum or md5sum file works too. Case and spaces don't matter.


Hashes

    • MD5 and SHA-1 are no longer collision-resistant. They're still fine for catching transfer errors, but not for signatures or security.
    • Never store passwords as a plain hash – not even SHA-256. Use bcrypt or Argon2 instead.
    • Browsers can only calculate SHA hashes in one go, so the limit is 1 GB. MD5 and CRC32 are read in chunks and work for larger files too.

    How it works

    1. Choose text or a file

      Enter some text or drop a file into the box. All hashes are calculated at once.

    2. Set the options

      Choose hex or Base64 and turn on HMAC with a secret key if you need it.

    3. Copy or verify

      Copy the hash you need or paste the publisher's checksum – the matching algorithm is highlighted.

    What is a hash?

    A hash function turns any data – a single word or a file several gigabytes in size – into a value of fixed length, such as 64 hexadecimal characters for SHA-256. The same data always produces the same hash. Change a single bit and you get a completely different value.

    Hashes are one-way functions: you can't calculate the original data back from the hash. That makes them useful for comparing data without sharing the data itself. Common uses:

    • Checksums for downloads such as ISO images or installers
    • Checking whether two files are identical without comparing them byte by byte
    • Making sure backups and archives stay intact over time
    • ETags and cache busting: a content hash in a file name like app.3f9a1c.js only changes when the file does

    Which algorithm for what?

    SHA-256 and SHA-512 are today's standard, including for security-sensitive uses like signatures and certificates. SHA-384 is a truncated variant of SHA-512.

    MD5 and SHA-1 are considered broken: for both, attackers can deliberately create two different files with the same hash (collisions). That rules them out for signatures or tamper protection. They still work fine for catching accidental errors during a download or copy.

    CRC32 isn't a cryptographic hash but a short checksum against transmission errors, as used in ZIP and PNG. It can't detect deliberate changes.

    HMAC combines a hash with a secret key. Only someone who knows the key can calculate the correct value – this is how webhooks and APIs check that a message comes from the expected sender and hasn't been altered.

    Why plain hashes are no good for passwords

    SHA-256 and friends are built for speed. A graphics card computes billions of them per second, so attackers with a stolen database can simply run through dictionaries and password lists. On top of that, identical passwords produce identical hashes.

    Passwords need dedicated, deliberately slow algorithms with a random salt: bcrypt and Argon2. In PHP, password_hash() takes care of this; for web server passwords, use bcrypt in your .htpasswd.

    Common mistakes when comparing

    When a hash doesn't match the expected value, the file is often fine – the input is what differs:

    • Trailing newline: echo "abc" | sha256sum hashes "abc" plus a line break. Use echo -n or printf.
    • Upper vs. lower case: hex hashes are the same regardless of case – A1B2 and a1b2 are the same value. Windows prints uppercase, Linux and macOS lowercase.
    • Text encoding: accented characters and emoji produce different bytes in UTF-8 than in Latin-1 or UTF-16, and therefore a different hash.
    • Line endings: Windows often saves text files with CRLF, Linux and macOS with LF. The same text then has different hashes.

    Frequently asked questions

    Can a hash be decrypted?

    No. A hash isn't encryption, and the original data isn't contained in it. For short or common inputs like simple passwords, though, the original can be found by trial and error or with precomputed tables.

    Is MD5 still secure?

    Not for security: MD5 collisions have been possible to create on purpose since 2004, so it's unsuitable for signatures and passwords. It's still fine as a checksum against accidental transmission errors or for spotting duplicate files. The same goes for SHA-1.

    How do I verify the SHA-256 checksum of a file?

    On Windows, use certutil -hashfile file.zip SHA256 or Get-FileHash file.zip in PowerShell; on macOS, shasum -a 256 file.zip; on Linux, sha256sum file.zip. Or drop the file into this tool and paste the publisher's checksum into the comparison field.

    Why doesn't my hash match the command line?

    Usually echo added a trailing newline – use echo -n or printf instead. Other causes are trailing spaces, different line endings (CRLF instead of LF) or a text encoding other than UTF-8.

    What's the difference between SHA-256 and SHA-512?

    SHA-512 produces a hash twice as long (128 instead of 64 hex characters) and is often even faster on 64-bit processors without hardware SHA acceleration. Both are considered secure; SHA-256 is more widespread and is what most publishers use for checksums.

    Are my files uploaded?

    No. All hashes are calculated in your browser – text, keys and files never leave your device.

    Source code of this tool on GitHub Open source under GPL-3.0, to read and download.

    Guides on this topic

    Related tools