BcryptGenerator.org

SHA-256 Hash Generator

Generate SHA-256 hashes using your browser's built-in Web Crypto API. Fast, accurate, and client-side only — no data is ever sent to our servers.

What is SHA-256?

SHA-256 is part of the SHA-2 family of hash functions, published by NIST in 2001. It turns any input into a 256-bit digest, written as 64 hexadecimal characters. It has no known practical collisions, which is why it secures TLS certificates, software signatures, Git (in its SHA-256 mode) and Bitcoin.

This tool uses crypto.subtle.digest('SHA-256'), the same native implementation your browser uses for HTTPS, so results match every standard SHA-256 library.

SHA-256 test vectors

Use these known values to check this tool, or your own code:

InputSHA-256 hash
(empty string)e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
abcba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
The quick brown fox jumps over the lazy dogd7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592

SHA-256 vs MD5 vs bcrypt

MD5SHA-256bcrypt
Output size128 bits256 bits184 bits + salt
SpeedVery fastVery fastDeliberately slow
Collision resistantNo (broken)YesNot its purpose
Built-in saltNoNoYes
Use for passwordsNeverNot on its ownYes
Best forLegacy checksumsIntegrity, signaturesPassword storage

To hash a file or verify a download's checksum, or to get SHA-1 and SHA-512 too, use the hash generator and checksum calculator.

In short: use SHA-256 to fingerprint data, and bcrypt (or Argon2id) to store passwords. Our bcrypt vs Argon2 guide covers the password side in depth.

Why your SHA-256 hash doesn't match

Generate a SHA-256 hash on the command line or in code

Linux

echo -n "abc" | sha256sum

macOS

echo -n "abc" | shasum -a 256

Windows PowerShell (files)

Get-FileHash .\file.zip -Algorithm SHA256

Node.js

require('crypto').createHash('sha256').update('abc', 'utf8').digest('hex')

Python

import hashlib
hashlib.sha256("abc".encode("utf-8")).hexdigest()

Browser JavaScript (what this tool uses)

const bytes = new TextEncoder().encode('abc')
const digest = await crypto.subtle.digest('SHA-256', bytes)
const hex = [...new Uint8Array(digest)].map(b => b.toString(16).padStart(2, '0')).join('')

SHA-256 FAQ

Can I use SHA-256 to hash passwords?+

Not on its own. SHA-256 is designed to be fast, so attackers with GPUs can test billions of guesses per second against a stolen hash. Use a password hashing function such as bcrypt or Argon2id. If you need a FIPS-approved option, OWASP recommends PBKDF2-HMAC-SHA256 with at least 600,000 iterations.

Can a SHA-256 hash be reversed?+

No. SHA-256 is a one-way function with no known practical attacks against it. As with any fast hash, though, short or common inputs can be found by guessing, so a hash of a weak password offers little protection.

How long is a SHA-256 hash?+

A SHA-256 hash is 256 bits (32 bytes), written as 64 hexadecimal characters or 44 Base64 characters.

What is the difference between SHA-256 and HMAC-SHA256?+

SHA-256 hashes data on its own, so anyone can compute it. HMAC-SHA256 mixes in a secret key, which proves the message came from someone who knows the key. Use HMAC for webhook signatures, API request signing and similar authentication checks.