Encoding and security

Hash Generator: MD5, SHA-1, SHA-256 and SHA-512

Hash text or files with MD5, SHA-1 and SHA-2 at once, sign data with HMAC, and check a download against its published checksum.

  • Free foreverNo trial, no paywall, no usage limits.
  • No sign-upOpen the page and start. We never ask for an email to use a tool.
  • PrivateEverything runs in your browser. Your input is never uploaded or stored on our servers.
  • Works offlineOnce the page has loaded, the tool keeps working without a connection.
Hash the UTF-8 bytes of text you type or paste. Updates live.Hash a file byte for byte, e.g. to check a download against its published checksum.
A plain digest: anyone can compute it from the same input.A keyed hash (RFC 2104): only someone with the secret key can produce or check it. Used to sign webhooks and API requests.
Lowercase hexadecimal, as printed by sha256sum, md5sum and most APIs.Uppercase hexadecimal, as Windows certutil and Get-FileHash print it.Shorter Base64 form, used by Subresource Integrity (integrity="sha384-…"), AWS Content-MD5 and many webhook signatures.

Text to hash

Hashes the exact UTF-8 bytes. Line breaks here are LF; a file saved with Windows CRLF endings hashes differently, so use File mode to match a file exactly.
Clear
Matches echo "text" | sha256sum, which hashes the text plus a line break. Leave off to match echo -n, printf or code that hashes the string itself.
0 bytes

Hashes

All five algorithms at once. Compare against a published value with Verify below.
Copy all
  • MD5128-bit128-bit, from 1992. Collisions take seconds to generate, so use it only to catch accidental corruption, never for security.Checksums only
    Copy MD5

    —

  • SHA-1160-bit160-bit. Publicly broken by the 2017 SHAttered collision. Still found in Git and old systems; avoid it for anything new.Checksums only
    Copy SHA-1

    —

  • SHA-256256-bit256-bit SHA-2. The default choice for file checksums, signatures, HMAC and content addressing.Recommended
    Copy SHA-256

    —

  • SHA-384384-bitSHA-512 with a different start state, truncated to 384 bits. Truncation makes it immune to length-extension attacks.
    Copy SHA-384

    —

  • SHA-512512-bit512-bit SHA-2 with 64-bit arithmetic, so it can outrun SHA-256 on 64-bit CPUs that lack SHA hardware instructions.
    Copy SHA-512

    —

MD5 and SHA-1 are broken for security: use them only to catch accidental corruption. For passwords use Argon2id, bcrypt or scrypt, never a plain hash.

Verify a checksum

Paste the hash published next to a download. The algorithm is detected from its length, and sha256sum lines, SHA256 (file) = … lines, sha256:… digests and SRI values all work.
Tip: a matching checksum proves the file arrived intact. It only proves authenticity if you got the checksum from a source you trust (ideally over HTTPS or signed).

Need a secure web app built around this? Talk to our team

Quick answer

A hash function turns any input into a short, fixed-length fingerprint: change one bit and the hash changes completely, and it cannot be run backwards. In Playxoft's hash generator, type text or drop a file to see its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes at once. Paste a published checksum into Verify to confirm a download is intact, or switch to HMAC to sign data with a secret key.

  • MD5, SHA-1 and SHA-2 at once
  • Text or file
  • HMAC with a key
  • Verify checksum
  • Hex or Base64 output
  • Files up to 1 GB

How to use the Hash Generator

  1. 1Type or paste text, or choose File and drop the file you want to fingerprint.
  2. 2Read all five hashes at once, and pick Lowercase hex, Uppercase hex or Base64 to match the format you are comparing against.
  3. 3To check a download, paste its published checksum into Verify a checksum. The algorithm is detected from its length and the matching row turns green.
  4. 4Switch Mode to HMAC and enter a Secret key to compute a keyed signature, for example to debug a webhook.
  5. 5Comparing with echo text | sha256sum? Turn on Add trailing newline, because echo appends one.

What is a hash function?

A cryptographic hash function maps input of any size to a fixed-size digest. Good ones have four properties:

  • Deterministic: the same bytes always give the same hash.
  • Avalanche effect: changing one bit flips about half of the output bits.
  • Preimage resistance: given a hash, you cannot find an input that produces it.
  • Collision resistance: you cannot find two different inputs with the same hash.

Adding a single period changes the whole digest:

MD5("The quick brown fox jumps over the lazy dog")  = 9e107d9d372bb6826bd81d3542a419d6
MD5("The quick brown fox jumps over the lazy dog.") = e4d909c290d0fb1ca068ffaddf22cbd0

Hashes fingerprint files, deduplicate data, address content (Git, Docker image digests, IPFS) and sit underneath digital signatures and HMACs. MD5 is specified in RFC 1321; SHA-1 and the SHA-2 family in FIPS 180-4.

Which hash algorithm should I use?

For anything new, use SHA-256. Keep MD5 and SHA-1 for compatibility and accidental-corruption checks only.

AlgorithmDigestHex lengthStatusUse it for
MD5128 bits32Broken: practical collisions since 2004Legacy checksums, cache keys
SHA-1160 bits40Broken: SHAttered collision (2017)Legacy systems, Git object IDs (Git still defaults to a hardened SHA-1)
SHA-256256 bits64SecureChecksums, signatures, HMAC, content IDs
SHA-384384 bits96SecureTLS suites, Subresource Integrity
SHA-512512 bits128SecureLarge-margin integrity, Ed25519 internals

"Broken" means an attacker can craft two different files with the same hash — enough to forge certificates (as the 2008 rogue CA demonstration did with MD5) or swap a document after it was approved. It does not mean that a random download with a matching MD5 is corrupted. SHA-384 and SHA-512/256 are truncated, which also makes them immune to length-extension attacks. SHA-3 and BLAKE3 are excellent too, but Web Crypto does not provide them, so they are not offered here.

Is MD5 or SHA-256 safe for passwords?

No — and the same goes for SHA-256 and SHA-512. General-purpose hashes are designed to be fast, and that is exactly the wrong property for passwords: an attacker who steals the table can try billions of guesses per second on GPUs, and unsalted hashes of common passwords are already in precomputed lookup tables. Those online "MD5 decrypters" are just such tables.

Store passwords with a deliberately slow, salted, memory-hard password hashing function:

  1. Argon2id (RFC 9106) — the first choice for new systems.
  2. scrypt (RFC 7914) — memory-hard, widely available.
  3. bcrypt — battle-tested; note it only uses the first 72 bytes of a password.
  4. PBKDF2 with a high iteration count — when FIPS compliance requires it.

The OWASP Password Storage Cheat Sheet lists current parameters. Use your platform's library (argon2 for Node, argon2-cffi for Python, golang.org/x/crypto/argon2 for Go, ASP.NET Core Identity's PasswordHasher (PBKDF2) for C#) rather than rolling your own.

How do I verify a file checksum?

Download the file and its published checksum (often a SHA256SUMS file next to the download), then compare. Drop the file into this tool and paste the checksum into Verify a checksum, or use the command line:

# Linux
sha256sum ubuntu.iso
sha256sum -c SHA256SUMS --ignore-missing

# macOS
shasum -a 256 ubuntu.iso

# Windows PowerShell
Get-FileHash .\ubuntu.iso -Algorithm SHA256
certutil -hashfile ubuntu.iso SHA256

A match proves the file is intact — not that it is authentic. If an attacker can replace the download, they can replace a checksum on the same page too. Trust a checksum only when it comes from a separate trusted channel or is itself signed (for example a GPG-signed SHA256SUMS.gpg).

Hashes differ between tools more often because of the input than the algorithm: echo adds a trailing newline, Windows files use CRLF line endings, and Windows PowerShell 5.1 writes UTF-16 files when you redirect with >. Hash the file itself whenever you can.

What is HMAC and how is it different from a hash?

An HMAC (RFC 2104) mixes a secret key into the hash, so only someone who knows the key can produce or check the value. That is how services sign webhooks: GitHub sends X-Hub-Signature-256: sha256=<hex HMAC-SHA256 of the body>, and Stripe signs a timestamp plus the body with HMAC-SHA256.

Never build your own sha256(key + message): MD5, SHA-1 and SHA-256 are vulnerable to length-extension attacks, which let an attacker append data and compute a valid tag without the key. HMAC's nested construction prevents that. Verified test vectors are published in RFC 4231, and this tool passes them.

// Node.js
const sig = crypto.createHmac("sha256", secret).update(body).digest("hex");
const expected = Buffer.from(sig), given = Buffer.from(received);
const ok = given.length === expected.length && crypto.timingSafeEqual(expected, given);

# Python
sig = hmac.new(secret, body, hashlib.sha256).hexdigest()
hmac.compare_digest(sig, received)

// Go
mac := hmac.New(sha256.New, secret); mac.Write(body)
hmac.Equal(mac.Sum(nil), receivedBytes)

// C#
var sig = HMACSHA256.HashData(secret, body);
CryptographicOperations.FixedTimeEquals(sig, receivedBytes);

Always compare signatures with a constant-time function, as above. A plain == stops at the first differing byte and leaks timing information.

Frequently asked questions

No. A hash is a one-way function with no key, so there is nothing to decrypt. Sites that claim to decrypt MD5 simply look the hash up in a table of hashes of known strings, which only works for short or common inputs such as weak passwords.
The input bytes differ, not the algorithm. The usual causes are a trailing newline added by echo, Windows CRLF line endings, a different text encoding such as the UTF-16 files Windows PowerShell 5.1 writes when you redirect output, or invisible whitespace. Turn on Add trailing newline to match echo, or hash the file itself in File mode.
Yes. There is no known practical collision or preimage attack on SHA-256, and it remains the default for checksums, TLS certificates, code signing and HMAC. It is not suitable for storing passwords, because it is fast; use Argon2id, scrypt or bcrypt for that.
SHA-512 produces a 512-bit digest and works on 64-bit words, so it can be faster than SHA-256 on 64-bit processors without SHA hardware instructions. Both are secure. SHA-384 is SHA-512 truncated to 384 bits, which also protects against length-extension attacks.
In theory yes, because there are more possible files than hashes. For SHA-256 no collision has ever been found. For MD5 and SHA-1, researchers can deliberately create colliding files, which is why those two must not be used where an attacker could choose the input.
No. Text and files are hashed in your browser with the built-in Web Crypto API and a local MD5 implementation. Nothing is sent to a server, and HMAC keys are never stored. Files up to 1 GB are supported, limited by browser memory.

Last updated by the Playxoft engineering team.

From the engineers who built this tool

Building something bigger than a quick fix?

Auth, payments, dashboards and security are where web apps get hard. We have shipped them many times. Share your idea and we will map out a realistic plan and estimate, free and with no obligation.

More free tools

See all tools

JWT Decoder

Decode JWTs, explain every claim and expiry, verify signatures and sign new tokens.

Open tool

Base64 Encoder and Decoder

Encode text or files to Base64 and back, with Base64url, data URIs and type-detected downloads.

Open tool

URL Encoder and Decoder

Percent-encode or decode URLs and query values, and inspect every parameter.

Open tool

UUID Generator

Generate v4 and v7 UUIDs in bulk, and decode any UUID's version and timestamp.

Open tool

Nanoid Generator

Generate nanoid IDs with any alphabet and length, and check how long until a collision.

Open tool

ULID Generator

Generate sortable ULIDs in bulk, decode their timestamps and convert them to UUIDs.

Open tool