100% Free · Runs In Your Browser

Hash Generator

Paste text or choose a file and get its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes at once. Turn on HMAC to sign with a secret key, or paste a hash to check whether it matches.

Hash generator

Text is hashed as UTF-8. A trailing space or line break changes the result.

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

Compare a hash

Hashing runs in your browser with the Web Crypto API. Nothing is sent to our server.

How to Use the Hash Generator

  1. Type or paste your text, or switch to File and choose one.
  2. All five hashes appear straight away and update as you type.
  3. Pick hex or Base64 output, and tick HMAC if you need a keyed hash.
  4. Click Copy beside the one you need, or paste an expected hash into the compare box to check it.

What Is a Hash?

A hash is a fixed-length fingerprint of some data. The same input always produces the same hash, a tiny change produces a completely different one, and there is no practical way to go backwards from the hash to the input. That makes hashes useful for checking that data has not changed. It is a one-way function, not encryption, so there is nothing to decrypt.

MD5, SHA-1, SHA-256, SHA-384 and SHA-512

AlgorithmOutput sizeHex lengthUse it for
MD5128 bits32Quick checksums only. Collisions can be forged, so avoid it for security.
SHA-1160 bits40Legacy systems such as old Git object IDs. Practical collisions have been shown, so avoid it for security.
SHA-256256 bits64The usual default for file checks, signatures and APIs.
SHA-384384 bits96Higher security margin, common in TLS and certificates.
SHA-512512 bits128Often faster than SHA-256 on 64-bit CPUs, and used in HMAC and key derivation.

Verify a Downloaded File

Software sites often publish a SHA-256 value next to the download. Hash your copy and compare it with that value. You can do it here by choosing the file, or from a terminal:

# Windows (Command Prompt)
certutil -hashfile setup.exe SHA256

# Windows (PowerShell)
Get-FileHash setup.exe -Algorithm SHA256

# macOS
shasum -a 256 setup.dmg

# Linux
sha256sum setup.iso

If the values differ, do not run the file. Download it again from the official site first.

Should You Hash Passwords With These?

No. MD5 and the SHA family are built to be fast, and speed is exactly what an attacker wants when guessing passwords. A modern graphics card can test billions of them per second, which is why leaked databases of plain SHA-256 passwords are cracked so quickly. Websites should store passwords with a slow, salted algorithm such as Argon2id, scrypt, bcrypt or PBKDF2. See the NIST password guidelines for current advice, and how long a password takes to crack to see what attackers can do. For your own accounts, the best protection is a long random password from the Strong Password Generator.

What Is HMAC?

HMAC (hash-based message authentication code) combines a hash with a secret key. Only someone who knows the key can create or check the result, so it proves a message came from a trusted sender and was not modified. Payment providers and webhook services use it to sign requests. Enter your key in the HMAC field and the five results above become keyed hashes. To make a random key, use the Developer Credential Generator.

Hash Text in Code

# Python
import hashlib
hashlib.sha256("hello".encode()).hexdigest()

// Node.js
require("crypto").createHash("sha256").update("hello").digest("hex");

// PHP
hash("sha256", "hello");

# Bash (use -n so no newline is added)
echo -n "hello" | sha256sum

Test Values

Use these to check that any tool, including this one, is working correctly.

InputAlgorithmHash
(empty string)MD5d41d8cd98f00b204e9800998ecf8427e
(empty string)SHA-256e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
abcMD5900150983cd24fb0d6963f7d28e17f72
abcSHA-1a9993e364706816aba3e25717850c26c9cd0d89d
abcSHA-256ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Related tools: Base64 Encoder / Decoder and the UUID Generator.

Frequently Asked Questions

A hash generator turns any input, such as a word, a paragraph or a whole file, into a short fixed-length string called a hash or digest. The same input always gives the same hash, and even a one-character change gives a completely different one. This tool computes MD5, SHA-1, SHA-256, SHA-384 and SHA-512 at the same time.

For anything security related, yes. MD5 has been broken for collision resistance for many years, so two different files can be built with the same MD5 hash. SHA-256 has no known practical attack and is the usual default. MD5 is still fine as a quick checksum to spot accidental corruption.

No. A hash is a one-way function, not encryption, so there is nothing to decrypt. Short or common inputs can still be guessed by hashing candidates and comparing, which is why plain hashes are not suitable for storing passwords.

No. These algorithms are designed to be fast, which lets an attacker test billions of guesses per second. Store passwords with a slow, salted function such as Argon2id, scrypt, bcrypt or PBKDF2. Use this page for checksums, tests and learning.

HMAC mixes a secret key into the hash so that only someone with the key can produce or verify the result. It is used to sign API requests and webhooks, and to check that a message was not changed. Tick the HMAC box, enter your key, and every hash on the page becomes an HMAC.

The usual causes are a different algorithm (SHA-256 against SHA-1), a changed or incomplete file, or, for text, an extra space or trailing line break. Use the compare box under the results: it checks your pasted hash against every algorithm at once.

Yes. Switch to File and choose one. The file is read by your browser and hashed locally, up to 200 MB, and it is not uploaded. This lets you verify an installer, a disk image or a backup.

No. All hashing runs in your browser with JavaScript and the Web Crypto API. Your text, key and files never leave your device.

Explore All Free Tools

Password Generators

Account Password Generators

Security Tools

Guides

More Free Tools

Site