1. Home
  2. Tools
  3. Hash Generator

Hash Generator

Get the SHA-1, SHA-256, SHA-384 and SHA-512 hash of text or a small file. It runs in your browser and nothing is uploaded.

Hash

Your text and files are hashed in your browser with the Web Crypto API and are not uploaded.

How to use it

  1. Choose Text and type or paste, or choose File and pick a file. The four hashes are worked out as you go.
  2. Use Copy next to the one you need. Switch on Uppercase hexadecimal if the system you are comparing with uses capitals.
  3. To check a download, hash the file and paste the checksum the publisher gave you into Compare with a known hash. The tool tells you whether it matches.

What a hash is

A hash function turns any input into a fixed-length fingerprint. The same input always gives the same result, a tiny change gives a completely different one, and you cannot work backwards from the fingerprint to the input. That makes hashes useful for checking that a file has not changed or been corrupted, and as one ingredient in signatures and many other security schemes.

Which one should I use?

  • SHA-256 is a good default for checksums and general integrity checks.
  • SHA-384 and SHA-512 give longer fingerprints from the same family.
  • SHA-1 is included because many older systems and checksums still use it, but it is considered broken for security purposes: different inputs with the same SHA-1 can be created on purpose. Do not use it for anything that must resist an attacker.

MD5 is not offered. It is broken in the same way and has no place in new work.

Not for storing passwords

A plain, fast hash is the wrong tool for storing user passwords. Attackers can try billions of guesses per second against it. Use a slow password hashing function built for the purpose, such as bcrypt, scrypt or Argon2, through a well-tested library.

Related tools

Base64 encoder and decoder, UUID generator and JWT decoder.

Frequently asked questions

No. The hashes are calculated by your browser’s built-in Web Crypto API. Nothing is sent to CodeROG or anyone else.

Usually the input differs by something invisible: a trailing newline, different line endings or a different character encoding. This tool hashes text as UTF-8 exactly as typed. A shell command such as echo abc | sha256sum also hashes a newline, so its result differs from the hash of abc.

The browser’s Web Crypto API does not offer it, because it is broken for security uses. The SHA family covers checksums and integrity checks.

Files up to 50 MB are accepted, because the whole file is read into memory to be hashed.

No. A hash is a one-way function. Short or common inputs can sometimes be guessed by trying many candidates, which is why plain hashes are not suitable for passwords.

Need a hand with this?

Let our engineers take it from here