About the SHA-256 Hash Generator
Compute the SHA-256 cryptographic hash of any text or a local file directly in your browser using the native Web Crypto API. View the digest as hexadecimal or base64, and compare it against an expected value to verify integrity.
How to use it
- 01Type or paste text into the input area, or choose a file (up to 25 MB).
- 02The SHA-256 digest is computed automatically and shown as hex and base64.
- 03Toggle uppercase hex if your workflow expects capitalized digests.
- 04Optionally paste an expected hash to check whether it matches.
Features
- Supports both text and file input, including binary files.
- Outputs hex and base64 simultaneously.
- Constant-shape comparison against an expected digest to report match or mismatch.
- 25 MB file size guard to keep in-browser hashing responsive.
Practical examples
Verifying a download
Hash a downloaded file and compare it to the checksum published by the file's author to confirm it wasn't corrupted or tampered with.
Deduplicating text records
Hash normalized text values to generate stable content identifiers for detecting duplicates.
Limitations
- Files larger than 25 MB are rejected to avoid freezing the browser tab; use a command-line tool for very large files.
- SHA-256 is a general-purpose hash, not a password-hashing function — do not use it alone to store passwords.
Privacy
Hashing happens entirely in your browser via the Web Crypto API. Neither the text nor the file content is uploaded anywhere; files are read locally as an ArrayBuffer and never leave the page.
Read the full privacy policy for how the site as a whole handles data.
Frequently asked questions
Does this work without an internet connection?
Yes, once the page is loaded, hashing works fully offline since it uses the browser's built-in crypto engine.
Why is crypto.subtle unavailable?
crypto.subtle requires a secure context (HTTPS or localhost); it is disabled on plain HTTP pages for security reasons.
Is the file comparison case-sensitive?
No, the comparison lowercases both values before checking, so pasted hashes in either case will match correctly.