Hash Generator

Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from text or files. Uses the browser's Web Crypto API for SHA hashes with a pure JS fallback for MD5.

100% client-side. Your data never leaves your browser.

Hashes
MD5
SHA-1
SHA-256
SHA-512

Converters & Examples

Related Tools

Hash Generator

Compute MD5, SHA-1, SHA-256, and SHA-512 hashes from text or file input. SHA hashes use the browser’s native Web Crypto API (crypto.subtle.digest). MD5 is computed with a pure JavaScript implementation of RFC 1321. All processing happens client side.

How to Use

  1. Choose input type. Select Text to hash a string, or File to hash a file’s raw bytes
  2. Enter your input. Type or paste text, or select a file from your filesystem
  3. Read the results. All four hash algorithms are computed simultaneously
  4. Copy what you need. Use the Copy button next to each algorithm, or Copy All for a formatted list
  5. Toggle uppercase. Switch between lowercase and uppercase hex output

How Cryptographic Hashing Works

A cryptographic hash function takes input of any length and produces a fixed length output that is deterministic (same input always gives the same output), fast to compute, and infeasible to reverse. The two security properties that matter are collision resistance (hard to find two inputs with the same hash) and preimage resistance (hard to find an input that produces a given hash).

SHA-256 and SHA-512 are part of the SHA-2 family designed by the NSA and published by NIST. They remain unbroken and are the standard choice for integrity verification, digital signatures, and content addressing. SHA-1 has theoretical collision attacks (demonstrated by Google’s SHAttered project in 2017) and is deprecated for security use, though it persists in legacy Git commits and some older systems.

MD5 was designed by Ronald Rivest in 1991. Collision attacks were demonstrated in 2004, and practical exploits followed, including a rogue CA certificate in 2008. MD5 is still widely used for noncryptographic checksums: verifying file downloads, content addressable storage, and deduplication.

When hashing files, this tool reads the file into memory and passes the raw bytes to the hash function. For text input, the string is encoded as UTF-8 bytes before hashing, the same encoding that command line tools like sha256sum use by default.

Need to encode binary hash output as text for transport? Try Base64 Encode/Decode. Working with JWTs? The JWT Decoder shows which signing algorithm (HS256, RS256, etc.) was used, all of which rely on SHA-256 under the hood.