SHA-1 and SHA-256 Hash Generator
Compute SHA-256 or SHA-1 hashes of any text using the browser's Web Crypto API, with a quick check for known weak inputs.
What a hash actually gives you
A cryptographic hash maps any input to a fixed-length output. The same input always produces the same output, a one-character change produces a completely different output, and the function is designed to be one-way. SHA-256 produces 256 bits, shown as 64 hexadecimal characters; SHA-1 produces 160 bits, shown as 40.
Where people go wrong
- SHA-1 is dead for security purposes. Practical collision attacks exist, so it must not be used for signatures, certificates or password storage. It survives only as a non-adversarial file checksum.
- A plain hash is not a password store. SHA-256 of a password is fast, and fast is the problem: a GPU tries billions of guesses per second. Password storage needs a deliberately slow, salted algorithm such as bcrypt, scrypt or Argon2.
- A hash is not encryption. You cannot reverse it, which is a feature for integrity checks and a disaster if you hashed something you needed to read back.
Common legitimate uses
Verifying that a download arrived intact, producing a cache-busting fingerprint for a static asset, building a deterministic deduplication key, or signing a webhook payload with HMAC. For HMAC you need a key as well as the message, so a plain hash tool is not a substitute.
Frequently asked questions
Can I reverse a SHA-256 hash?
Not by computation. Only by guessing the input and hashing it, which is why short or common inputs are effectively reversible via lookup tables.
Why is this page not offering MD5?
MD5 is cryptographically broken and browsers' Web Crypto API deliberately does not implement it. Use SHA-256.
What length is the output?
SHA-256 gives 64 hex characters, SHA-1 gives 40.
Can I hash a file here?
This build hashes text. Paste the text or use the command-line equivalent for files.
Related tools
Word Counter
Count words, characters, sentences and paragraphs as you type, with an estimated reading time. Runs entirely in your browser.
Character Counter
Count characters with and without spaces, letters, digits and punctuation, plus a letter frequency table for any text.
Case Converter
Convert text between eight letter cases instantly: uppercase, lowercase, title case, sentence case, camelCase, PascalCase, snake_case and kebab-case.
JSON Formatter & Validator
Format messy JSON with clean indentation, minify it back, or find the exact position of a syntax error. Runs locally in your browser.