SHA256 Hash Generator
Calculate SHA-256 hashes instantly online. Supports UTF-8, UTF-16, Hex, and Base64 input encodings. Enable HMAC-SHA256 for JWT signing, webhook verification, and API authentication codes.
Share Link
Related Hash Tools
Frequently Asked Questions
What is SHA-256?
How many characters is a SHA-256 hash?
e3b0c44298fc1c149afb...). In Base64 format, the same digest is 44 characters.SHA-256 vs SHA-512 — which should I choose?
What is HMAC-SHA256 used for?
Is SHA-256 used in Bitcoin?
About SHA256 Hash Generator
SHA-256 (Secure Hash Algorithm 256) is a cryptographic hash function from the SHA-2 family, published by NIST as FIPS 180-4. It produces a 256-bit (32-byte) digest from input of any length, displayed as a 64-character hexadecimal string. SHA-256 is the most widely deployed hash algorithm in the world, underpinning TLS certificates, code signing, software package verification, blockchain networks, and modern authentication protocols.
How SHA-256 Works
SHA-256 pads the input to a multiple of 512 bits and processes it in 512-bit blocks. Each block goes through 64 rounds of bitwise operations using eight 32-bit state variables (A through H) and a schedule of 64 derived message words. The constants used are derived from the fractional parts of cube roots of the first 64 prime numbers, ensuring no hidden structure. The final eight state values are concatenated to form the 256-bit output.
SHA-256 in TLS and Web Security
Every HTTPS connection negotiated today uses SHA-256 in certificate signature verification and the TLS handshake's Finished message. All major Certificate Authorities have issued SHA-256 certificates since 2016, replacing the deprecated SHA-1. When you see a padlock in your browser, SHA-256 is part of what makes that connection trustworthy.
HMAC-SHA256
HMAC-SHA256 adds a secret key to the hashing process, producing a keyed message authentication code. It is the standard algorithm for JWT HS256 tokens (used by Auth0, Firebase, and most REST APIs), AWS Signature Version 4 request signing, GitHub webhook payload authentication, and RFC 6238 TOTP one-time passwords. Enable the HMAC option above and enter your secret key to compute HMAC-SHA256.
SHA-256 in Blockchain
Bitcoin and many derived cryptocurrencies apply SHA-256 twice (Double SHA-256) to transaction IDs and block headers. Proof-of-Work mining consists of repeatedly hashing a block header (varying the nonce field) until the output begins with a required number of zero bits. This requires an enormous number of hash computations, making the ledger tamper-resistant.
SHA-256 vs SHA-1 and MD5
SHA-256 produces a 256-bit digest compared to SHA-1's 160 bits and MD5's 128 bits. Unlike SHA-1 (which was broken by SHAttered in 2017) and MD5 (broken since 1996), no practical collision attacks exist against SHA-256. It is NIST-approved for use in federal systems through 2030 and beyond under the SHA-2 standard.