Tool

Hash Generator

Compute cryptographic hashes using MD5, SHA-1, SHA-256, SHA-384, or SHA-512. Uses the Web Cryptography API — all computation is client-side.

Hash Result (SHA-256)
Enter text above to generate a hash

Uses the Web Cryptography API's SubtleCrypto interface. All computation is client-side.

How to Use This Tool

Type or paste your input text into the text area. The hash is computed automatically as you type using your browser's Web Crypto API (SHA family) or a pure-JS implementation (MD5).

Select the hash algorithm from the dropdown: MD5 (legacy, 128-bit), SHA-1 (legacy, 160-bit), SHA-256 (recommended, 256-bit), SHA-384 (384-bit), or SHA-512 (512-bit). The output updates instantly.

The result is the hex-encoded hash of your input. Hash functions are one-way — the same input always produces the same output, but you cannot reverse the hash to recover the original input.

Code Examples

const crypto = require('crypto');

// SHA-256
const hash256 = crypto
  .createHash('sha256')
  .update('your input text')
  .digest('hex');
console.log(hash256);

// SHA-512
const hash512 = crypto
  .createHash('sha512')
  .update('your input text')
  .digest('hex');
console.log(hash512);

Frequently Asked Questions

Which hash algorithm should I use?

For data integrity verification and HMAC, use SHA-256 or SHA-512. For password hashing, do NOT use raw SHA — use bcrypt, Argon2, or scrypt instead, which are designed to be slow and resist brute-force attacks. MD5 and SHA-1 are cryptographically broken and should only be used for non-security purposes like checksums.

Can I hash a file with this tool?

This tool hashes text input. To hash a file, use the sha256sum command in Linux/macOS (sha256sum filename), or certutil -hashfile filename SHA256 in Windows. For browser-based file hashing, you would need to read the file as an ArrayBuffer and pass it to the Web Crypto API.

Is my input sent to a server?

No. All hashing runs entirely in your browser. Your text never leaves your device. You can verify this by checking the Network tab in your browser's developer tools — there are no outbound requests when you type.

Why do the same words hash differently with different algorithms?

Each algorithm uses a different mathematical function and produces a fixed-length output specific to that algorithm: MD5 produces 128-bit (32 hex char) outputs, SHA-256 produces 256-bit (64 hex char) outputs, and SHA-512 produces 512-bit (128 hex char) outputs. The same input fed to different algorithms will always produce completely different hashes.

Related Tools