Hash Generator

Generate cryptographic hash digests and verify file checksums with SHA-256, SHA-384, SHA-512, and legacy MD5/SHA-1.

INPUT
UTF-8 · 96 chars · 96 bytes
Hashing is not encryption

General-purpose hashes such as SHA-256 should not be used directly for password storage. Use a dedicated password-hashing algorithm such as Argon2, bcrypt, or scrypt.

  • Local Processing
    Text and files are hashed entirely in your browser.
  • Multiple Algorithms
    Generate SHA-256, SHA-384, SHA-512, and supported legacy checksums.
  • File Checksums
    Verify files by comparing deterministic hash values.

Knowledge Base

Understanding Cryptographic Hashes

A cryptographic hash function converts arbitrary-length input data into a fixed-length string of bytes (a digest). The process is strictly deterministic and one-way.

Input
"hello"
SHA-256
Deterministic Digest (Fixed 256 bits)
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Deterministic

The exact same input always yields the exact same hash digest, regardless of when or where it is executed.

Fixed Length

Whether hashing a single character or a 100MB file, SHA-256 always produces exactly 256 bits (64 hex characters).

One-Way

It is computationally infeasible to reconstruct the original input from its resulting hash digest.

Avalanche Effect

Changing even a single bit or letter in the input drastically alters the resulting hash output.

Cryptographic Algorithm Comparison

AlgorithmDigest SizeSecurity StatusTypical Use Case
SHA-256256-bit (32 bytes)RecommendedStandard general hashing, file integrity, blockchain
SHA-384384-bit (48 bytes)RecommendedHigh-assurance security architectures, TLS certificates
SHA-512512-bit (64 bytes)Recommended64-bit performance systems, cryptographic workflows
SHA-1160-bit (20 bytes)LegacyLegacy Git commits, older checksums (collision vulnerable)
MD5128-bit (16 bytes)LegacyLegacy checksum systems, non-cryptographic cache keys
Developer Quickstart

Developer Implementation Guides

Reference implementations for computing SHA-256 across popular programming environments.

// Browser Web Crypto API (native, client-side, UTF-8)
async function computeSha256(message: string): Promise<string> {
  const bytes = new TextEncoder().encode(message);
  const hashBuffer = await crypto.subtle.digest("SHA-256", bytes);

  return Array.from(new Uint8Array(hashBuffer), (b) =>
    b.toString().padStart(, "0")
  ).join("");
}

// Example usage
computeSha256("hello").then(console.log);
// Output: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

FAQ

Frequently Asked Questions

A cryptographic hash is a mathematical algorithm that maps arbitrary data into a fixed-size byte string. It is designed to be one-way, unique, and extremely sensitive to input modifications.
SHA-256 produces a 256-bit (32-byte) digest using 32-bit arithmetic words, while SHA-512 produces a 512-bit (64-byte) digest using 64-bit words. SHA-512 can often run faster on 64-bit hardware.
No. Encryption is a two-way function designed to scramble data and decrypt it later with a key. Hashing is a one-way mathematical reduction designed never to be reversed.
No. Because information is compressed down to a fixed number of bits, multiple theoretical inputs could map to the same digest. Hashes cannot be 'decrypted' back into original text.
A collision occurs when two distinct inputs produce the exact same digest. Algorithms like MD5 and SHA-1 have known collision vulnerabilities, which is why SHA-256 and SHA-512 are recommended.
Researchers have demonstrated practical collision attacks against both MD5 and SHA-1. They are retained on ToolPorta strictly for verifying legacy checksums, never for security applications.
No. Fast algorithms like SHA-256 allow attackers to test billions of guesses per second with GPUs. Passwords should always use deliberately slow algorithms like Argon2, bcrypt, or PBKDF2.
Yes. ToolPorta reads your file directly in browser memory using the Web Crypto API, without uploading any byte to any server.
Never. All hashing operations execute 100% on your device inside your browser.
View all tools (15)