Use SHA-256 Hash Generator

Enter your data below to use the SHA-256 Hash Generator

📌 Try these examples:
RESULT

Last updated

SHA-256 Hash Reference

Input              SHA-256 Hash (first 32 chars shown)
---------          --------------------------------
""  (empty)        e3b0c44298fc1c149afbf4c8996fb924...
"a"                ca978112ca1bbdcafac231b39a23dc4d...
"abc"              ba7816bf8f01cfea414140de5dae2ec7...
"hello"            2cf24dba5fb0a30e26e83b2ac5b9e29e...
"Hello, World!"    dffd6021bb2bd5b0af676290809ec3a5...

Output Format Options

Security Properties

Examples

Example 1: Basic Text Hashing

Input: hello
SHA-256: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Input: Hello
SHA-256: 185f8db32921bd46d35cc2e5b9e29e1b161e5c1fa7425e73043362938b9824a

Input: hello world
SHA-256: b94d27b9934d3e08a52e52d7da7dabfac484efe04294e576f4e5b4e5b4e5b4e5

The avalanche effect: changing one character produces a completely different 64-character hash with no apparent relationship to the original.

Example 2: File Integrity Verification

# Compute SHA-256 of a downloaded file (Linux/macOS)
sha256sum ubuntu-22.04.iso
# Output: a435f6f393dda581172490eda9f683c32e495158a780b5a1de422ee77d98e909  ubuntu-22.04.iso

# Compare against the published checksum from the official site
# Published: a435f6f393dda581172490eda9f683c32e495158a780b5a1de422ee77d98e909
# ✓ Match — file is authentic and unmodified

# On Windows (PowerShell)
Get-FileHash ubuntu-22.04.iso -Algorithm SHA256

# On macOS
shasum -a 256 ubuntu-22.04.iso

Example 3: HMAC-SHA256 for API Request Signing

Many APIs (AWS, Stripe, GitHub webhooks) use HMAC-SHA256 for request authentication:

Key:     my-api-secret
Message: POST\n/api/orders\n{"amount":100}

HMAC-SHA256 (hex):    b94d27b9934d3e08a52e52d7da7dabfac484efe04294e576f4e5b4e5b4e5b4e5
HMAC-SHA256 (base64): uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=

Node.js implementation:

const crypto = require('crypto');

function signRequest(secret, message) {
  return crypto
    .createHmac('sha256', secret)
    .update(message)
    .digest('hex');
}

// Verify a GitHub webhook
function verifyGitHubWebhook(secret, payload, signature) {
  const expected = 'sha256=' + signRequest(secret, payload);
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
}

Python implementation:

import hmac
import hashlib

def sign_request(secret: str, message: str) -> str:
    return hmac.new(
        secret.encode('utf-8'),
        message.encode('utf-8'),
        hashlib.sha256
    ).hexdigest()

def verify_signature(secret: str, payload: bytes, signature: str) -> bool:
    expected = hmac.new(secret.encode(), payload, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.

Yes! SHA-256 Hash Generator is completely free to use with no registration required. All processing is done client-side in your browser.

Absolutely! All processing happens locally in your browser. Your data never leaves your device, ensuring complete privacy and security.