Hash Generator — MD5, SHA-1, SHA-256, SHA-512

Compute cryptographic hashes from text or files — instantly, privately, in your browser.

0 chars

Fast, non-cryptographic. Use only for checksums or legacy compatibility.

Deprecated for security. Still used by Git object IDs.

Standard secure hash. The default for most modern use cases.

Longer SHA-2 variant. Common in TLS and JOSE.

Longest SHA-2 variant. Useful when collision resistance matters most.

All hashing runs locally using the browser's SubtleCrypto API (and a pure-JS MD5 implementation). Your text and files never leave your device.

Private by design

All hashing happens locally. Text and files never leave your device — safe for sensitive data.

Five algorithms at once

MD5, SHA-1, SHA-256, SHA-384, and SHA-512 computed in parallel as you type.

Text or file input

Hash a string, an API response, a config file, or a multi-megabyte download.

What is a cryptographic hash?

A cryptographic hash function compresses any input into a fixed-length fingerprint. The output looks random, the same input always produces the same fingerprint, and even a single-bit change in the input completely changes the output. Hashes underpin digital signatures, TLS certificates, blockchain, integrity checks, version control, and content-addressed storage.

Choosing the right algorithm

  • SHA-256 — the modern default. Used in TLS, Bitcoin, JWT signatures, and most package managers.
  • SHA-512 — same family as SHA-256 with a longer digest. Slightly faster on 64-bit CPUs.
  • SHA-384 — truncated SHA-512 commonly seen in TLS cipher suites and JOSE (JSON signatures).
  • SHA-1 — deprecated for security but still used by Git for object IDs and by some legacy systems.
  • MD5 — fast and tiny but broken: do not use for anything security-sensitive. Useful for non-security checksums.

Verifying a downloaded file

Many software projects publish a SHA-256 checksum next to each release so users can confirm the download was not corrupted or tampered with. Switch this tool to File mode, pick the file you downloaded, and compare the SHA-256 output to the published value. A single different character means the file is not authentic — do not run it.

Frequently asked questions

What is a hash function?

A hash function takes input of any size — a password, a sentence, an entire file — and produces a fixed-length string of characters called a digest. The same input always produces the same digest, but even a one-character change produces a completely different output. Hashes are used for verifying file integrity, indexing data, fingerprinting content, and (with proper algorithms and salting) storing passwords.

Which algorithm should I use: MD5, SHA-1, SHA-256, or SHA-512?

For any security-sensitive use, choose SHA-256 or SHA-512. SHA-256 is the modern default and is used by TLS certificates, Bitcoin, and most JWT signatures. SHA-512 is similar but produces a longer digest. MD5 and SHA-1 are considered cryptographically broken — they should only be used for non-security tasks like file checksums, deduplication keys, or legacy compatibility (Git, for example, still uses SHA-1 internally).

Is my text or file sent to a server?

No. All hashes are computed entirely in your browser using the standard SubtleCrypto API (for SHA-1, SHA-256, SHA-384, and SHA-512) and a pure-JavaScript implementation for MD5. Your input — including any uploaded files — is never transmitted, logged, or stored. You can safely hash passwords, private documents, and sensitive data.

Can I hash a file with this tool?

Yes. Switch to File mode and select a file from your device. The file is read into memory locally and all five algorithms run in your browser. This is the standard way to compute a file checksum to verify it matches a published hash — for example, confirming a software download has not been tampered with.

Is MD5 safe to use for passwords?

No. MD5 is fast and has known collision attacks, which makes it unsuitable for password storage. For passwords, use a purpose-built password hashing function like bcrypt, scrypt, or Argon2, which are intentionally slow and salt each password to defeat rainbow-table attacks. A plain SHA-256 of a password — even a long one — is also not safe enough for production systems.

Why do my hashes change every time I run them on the same file?

They should not. Hash functions are deterministic: the same input always produces the same digest, byte for byte. If your hashes are changing, the input is changing too — common causes are different line endings (LF vs CRLF), trailing whitespace, character encoding differences (UTF-8 vs UTF-16), or a file that is being modified between runs.

What is the difference between hashing and encryption?

Hashing is a one-way operation: given a digest, you cannot recover the original input. Encryption is two-way: encrypted data can be decrypted with the right key. Use hashing to verify integrity or fingerprint content; use encryption to protect the confidentiality of data that must later be read back.

How is text encoded before being hashed?

All algorithms in this tool encode your text as UTF-8 before hashing. This matches the behavior of most server-side libraries and command-line tools like sha256sum and openssl dgst, so digests produced here will match the same input hashed in Python, Node.js, Go, Ruby, or the shell — provided UTF-8 is also used there.

Can I use the digest to verify a download?

Yes. Many open-source projects publish a SHA-256 checksum next to each release. Download the file, switch this tool to File mode, select the downloaded file, and compare the SHA-256 output character by character to the published value. If they match, the file has not been corrupted in transit or tampered with.

Part of our growing tool belt — all client-side, all free.