Skip to content

↑↓ navigate ↵ open Esc close Search runs locally

SHA-256 Hash Generator & Checksum Verifier

Generate the SHA-256 hash of text or a file and verify downloads against a published SHA-256 checksum. Fast, free, and nothing leaves your browser.

  • Runs in your browser
  • Nothing is uploaded
  • Free, no sign-up
Algorithms
0 BUTF-8
Hashes

    Runs in your browser. Files are never uploaded. Tip: drop a file to verify a download

    How to use the SHA-256 tool#

    1. Type or paste text, or drop a file onto the left box (up to 1 GB).
    2. The 64-character SHA-256 hash appears on the right as you type, or when the file has been read.
    3. To verify a download, paste the published checksum into Compare with a checksum. A green row means the file is authentic and complete.
    4. Select other algorithms in the top bar to calculate SHA-512, SHA3-256 or BLAKE3 at the same time.

    Examples#

    SHA-256 of a word

    Input
    hello
    Output
    2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

    Always 64 hex characters (256 bits).

    Two words

    Input
    hello world
    Output
    b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

    Adding one word changes every part of the hash.

    SHA-256 of an empty string

    Input
    Output
    e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

    Seeing this value usually means an empty file or empty input was hashed.

    What is SHA-256?#

    SHA-256 is a cryptographic hash function that turns any input into a 256-bit fingerprint, written as 64 hexadecimal characters. It belongs to the SHA-2 family, designed by the NSA and published by NIST in 2001 (FIPS 180-2). It is the most widely used secure hash today: no collision has ever been found, and none is expected with current technology.

    Where SHA-256 is used#

    • Download checksums: Linux distributions, programming languages and most software publish SHA-256 values.
    • TLS certificates: the certificates that secure HTTPS sites are signed with SHA-256.
    • Bitcoin: mining and transaction IDs use double SHA-256.
    • Git: newer repositories can use SHA-256 object IDs instead of SHA-1.
    • Code signing, JWTs (HS256, RS256) and HMAC.
    • Subresource Integrity: the integrity="sha256-…" attribute on scripts and styles.

    How SHA-256 works (briefly)#

    The message is padded to a multiple of 512 bits, with its length added at the end. It is then processed in 512-bit blocks: each block goes through 64 rounds of bit operations (rotations, XORs and additions) that mix it into eight 32-bit state words. After the last block, those eight words, joined together, are the 256-bit hash.

    PropertySHA-256
    Output size256 bits (64 hex characters, 44 Base64 characters)
    Block size512 bits
    Rounds64
    Collision foundNo
    StandardFIPS 180-4

    How to verify a SHA-256 checksum#

    Drop the file into the tool, paste the expected checksum into Compare with a checksum, and look for the green row. On the command line:

    bash
    # Linuxsha256sum file.iso # Check against a SHA256SUMS filesha256sum -c SHA256SUMS --ignore-missing # macOSshasum -a 256 file.iso # Windows PowerShellGet-FileHash .\file.iso -Algorithm SHA256

    SHA-256 alone is not for passwords. It is secure as a fingerprint, but fast: an attacker with a GPU can test billions of password guesses per second. Use bcrypt or Argon2 for passwords.

    SHA-256 in code#

    JavaScript (browser)#

    javascript
    const bytes = new TextEncoder().encode('hello');const hash = await crypto.subtle.digest('SHA-256', bytes);const hex = [...new Uint8Array(hash)].map((b) => b.toString(16).padStart(2, '0')).join('');// "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"

    Node.js#

    javascript
    import { createHash } from 'node:crypto'; createHash('sha256').update('hello').digest('hex');

    PHP#

    php
    hash('sha256', 'hello');hash_file('sha256', 'file.iso');

    Python#

    python
    import hashlib hashlib.sha256(b'hello').hexdigest() # Large files, piece by pieceh = hashlib.sha256()with open('file.iso', 'rb') as f:    for chunk in iter(lambda: f.read(1 << 20), b''):        h.update(chunk)print(h.hexdigest())

    Common errors and fixes#

    • My SHA-256 differs from the terminal

      echo adds a newline. Use echo -n "text" | sha256sum or printf "text" | sha256sum to hash exactly the text.

    • The checksum of my download does not match

      Download the file again: it is incomplete or corrupted. If it still does not match, do not run it, and check that you are using the checksum from the official site.

    • The website shows the checksum in Base64

      Subresource Integrity and some APIs use Base64 (sha256-…). Paste the part after sha256- into Compare, or choose Base64 under Format.

    Frequently asked questions#

    How long is a SHA-256 hash?

    256 bits: 64 hexadecimal characters, or 44 characters in Base64.

    Can SHA-256 be reversed?

    No. SHA-256 is a one-way function. The only way to find an input is to guess it, which is impractical for anything but short or common values.

    Is SHA-256 still secure?

    Yes. No practical attack on SHA-256 is known, and it is approved for government and financial use.

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

    Both are SHA-2. SHA-512 gives a 512-bit hash and uses 64-bit operations, so it is often faster on 64-bit computers. SHA-256 is more widely used for checksums.

    Is my file uploaded?

    No. The file is read and hashed in your browser, in 4 MB pieces, and never leaves your device.

    Your next tool is one search away.

    Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.

    Browse all tools

    Tip: press Ctrl D to bookmark dev247.