Security & Privacy Tools

Cryptographic Hash Generator

Compute cryptographic hashes for text locally using Web Crypto. Supports SHA-256, SHA-512, SHA-384, and SHA-1 with instant hash verification.

  • Free
  • No sign-up
  • Runs in your browser

Hash Generator

0 chars / 0 bytes Calculated locally via Web Crypto API
SHA-256 (Recommended for integrity)
256 bits (64 hex chars)
SHA-512
512 bits (128 hex chars)
SHA-384
384 bits (96 hex chars)
SHA-1 Legacy / Insecure for Passwords
160 bits (40 hex chars)
Paste a hash above to verify match against calculated values.

Runs in your browser. Your inputs never leave your device.

Quick Answer

To generate cryptographic hashes for plain text, type or paste your string below. The tool calculates SHA-256, SHA-512, SHA-384, and legacy SHA-1 concurrently in your browser using the hardware-accelerated Web Cryptography API. All operations run entirely in local memory with zero remote transmission.

How to Use

  1. Enter Plain Text. Type or paste your message or secret in the input area to calculate hashes live.
  2. Select Digest Format. Toggle between lowercase hex (standard) and uppercase hex format.
  3. Verify or Copy. Copy any hash with a single click, or paste a target checksum into the compare field to verify a match.

Cryptographic Hash Function Principle

H = Hash(M) | Where H is fixed-size digest, M is variable-length message

A cryptographic hash function maps arbitrary-length binary data to a fixed-length hexadecimal digest. Ideal hash functions are deterministic, fast to compute, non-reversible (pre-image resistance), collision-resistant (no two messages yield the same digest), and exhibit an avalanche effect where a 1-bit input change alters over 50% of the output bits.

Worked Examples

SHA-256 Digest of Empty String

Algorithm: SHA-256 (256-bit digest) · Input: Empty String ("")

  1. Initialize standard 8 32-bit state words from fractional parts of square roots of first 8 primes
  2. Pad input with bit 1 followed by zeros and 64-bit length descriptor
  3. Process 512-bit message block through 64 compression rounds
  4. Produce canonical 64-character hexadecimal digest

Result: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

SHA-512 Digest of Standard Greeting

Algorithm: SHA-512 (512-bit digest) · Input: "hello world"

  1. Encode ASCII characters to UTF-8 byte stream [0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64]
  2. Execute 80 compression rounds on 1024-bit blocks using 64-bit word operations
  3. Convert output 64 bytes to 128-character hexadecimal string

Result: 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e40ae9074da

SHA-1 Legacy Test Vector

Algorithm: SHA-1 (160-bit digest) · Input: "The quick brown fox jumps over the lazy dog"

  1. Execute SHA-1 compression rounds producing 20-byte digest
  2. Format as 40 hexadecimal characters

Result: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12

Common Mistakes to Avoid

  • Using Fast Hashes (SHA-256/MD5) for Passwords: Fast cryptographic hash functions can compute billions of guesses per second on consumer GPUs. Passwords must always use slow, memory-hard key derivation functions like Argon2, bcrypt, or PBKDF2 with unique salts.
  • Using SHA-1 or MD5 in New Systems: SHA-1 and MD5 have proven practical collision vulnerabilities (e.g. SHAttered attack). They are obsolete and insecure for digital signatures, certificates, and integrity guarantees.
  • Ignoring Character Encoding (UTF-8 vs Latin-1): Hashing depends on raw binary bytes. Hashing multi-byte Unicode characters (accents, emojis) in different encodings produces completely divergent digests.
  • Relying on Unsalted Hashes: Hashing without cryptographic salting allows attackers to reverse digests instantly using precomputed rainbow tables.

Frequently Asked Questions

Is SHA-256 safe for storing passwords?

No. SHA-256 is designed to be extremely fast for checksums, allowing modern GPUs to guess over 10 billion hashes per second. For passwords, always use slow, salted, memory-hard algorithms such as Argon2id, bcrypt, or scrypt.

Why is MD5 not available in this tool?

MD5 has been cryptographically broken since 2004, with trivial collision vulnerabilities demonstrated in under one second. Because MD5 presents critical security risks when used in modern applications, ToolsBuilt does not implement or offer MD5.

Can a cryptographic hash be decrypted or reversed?

No. Hash functions are strictly one-way mathematical operations that compress data, discarding original length and structure. A hash cannot be mathematically reversed; it can only be guessed by brute force.

What is the difference between SHA-256 and SHA-512?

SHA-256 produces a 256-bit (32-byte) digest using 32-bit operations, while SHA-512 produces a 512-bit (64-byte) digest using 64-bit operations. On 64-bit CPU architectures, SHA-512 is frequently faster than SHA-256.

Does ToolsBuilt send my text to a server to compute the hash?

No. All hashes are calculated locally inside your web browser using Web Crypto (crypto.subtle). Your input text and computed hashes are never transmitted across the network.

Sources & References