SHA-256 Hash Generator
Generate a SHA-256 hash of text or a file in your browser and verify a SHA-256 checksum — the safe default digest.
Digest
About this input
Import from File
Drag & drop a file here
or
Supports .txt, .csv, .log, .json and other text files
What It Does
This tool computes the SHA-256 digest of text or a file — 256 bits, 64 hexadecimal characters, or 44 in Base64. SHA-256 is the member of the SHA-2 family that most of the modern internet relies on: TLS certificates, software release checksums, Bitcoin's proof of work, Subresource Integrity tags and most API request signing. It is computed here with the browser's native WebCrypto implementation, the same code your browser uses for HTTPS.
When to Use It
- A project publishes SHA-256 checksums next to its release binaries and you want to confirm your download matches before running it.
- You are writing a Subresource Integrity attribute and need the Base64 SHA-256 of a script file.
- You need a stable, collision-resistant identifier for content — a cache key, a deduplication fingerprint, a content-addressed filename.
- You are debugging a signature and want to see the raw SHA-256 of a request body before HMAC is involved.
Worked Examples
Even empty input has a digest: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. Seeing this value in a log usually means something hashed an empty body by mistake.
abc
The NIST test vector: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. Switch to Base64 and you get the form used in SRI integrity attributes.
line one
line two
Browsers turn pasted line breaks into LF, so this is hashed with Unix endings. The same two lines saved as a Windows file with CRLF hash to a completely different value — to match such a file's checksum, load the file itself.
Features
How to Use
1. Type or paste text, or choose Hash a file to hash a file's raw bytes. 2. Pick the output encoding the value will be compared against — hex is the usual one. 3. To check a published checksum, paste it into the comparison box; the tool tells you whether it matches and, if not, whether it is even the same algorithm.
Common Mistakes
- Hashing text that is not byte-for-byte what the other side hashed. A trailing newline, Windows line endings or a byte-order mark each produce a completely different SHA-256 value, and none of them are visible.
- Comparing a hex digest with a Base64 one. They encode the same bytes differently, so they never look alike even when they match — switch the output format before deciding two values disagree.
- Comparing digests in mixed case and concluding they differ. Hex is case-insensitive; ABCDEF and abcdef are the same value.
- Using a plain SHA-256 digest where a secret is involved. To prove a message came from someone holding a key, you need HMAC, not hash(secret + message).
Frequently Asked Questions
Related Tools
Everything runs in your browser. Text and files are hashed locally — nothing is uploaded, logged or stored.