Home › Web & Security

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

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.