How to hash text with SHA-1, SHA-256 or SHA-512

Paste text and the page returns its SHA-1, SHA-256 or SHA-512 digest as a lowercase hexadecimal string. The hashing runs in this browser tab: nothing is uploaded, and the same text always produces the same digest.

A digest is a one-way value — it cannot be turned back into the text — so it is a tool for checking that two texts are identical, not for keeping a text secret.

  1. Type or paste the text into the box. The field takes plain text; there is no file upload.
  2. Press Generate SHA-1, Generate SHA-256 or Generate SHA-512. The digest appears below, together with its algorithm and length.
  3. Press Copy to put the hexadecimal digest on the clipboard.
  4. Editing the text clears the shown digest, so the value on screen always belongs to the text in the box. Press Clear to empty both.

What the page computes — and what it does not

The three algorithms

SHA-1 produces 40 hexadecimal characters (160 bits), SHA-256 produces 64 (256 bits) and SHA-512 produces 128 (512 bits). All three are computed over the UTF-8 bytes of the text — the same bytes that sha1sum, shasum or openssl dgst hash on the command line — so the same input gives the same value here and there.

The family differs in more than output length. A practical collision for SHA-1 was demonstrated in 2017 (the SHAttered attack), so SHA-1 is suitable for compatibility checks against existing data, not for new security decisions; SHA-256 and SHA-512 are the current members.

What the digest is for

The digest is a fingerprint of the text: any change to the input — one extra space, one changed letter — produces a completely different value. Comparing two digests is a fast way to confirm that two texts are byte-identical.

It is not encryption: there is no key and no way to reverse the output, and a digest by itself does not prove who wrote a text — anyone who can change the text can also change its hash. For storing passwords, plain SHA-1/SHA-256/SHA-512 is the wrong tool; password storage needs a slow, salted algorithm such as bcrypt, scrypt or Argon2.

Limits and practical notes

The page hashes text only: it cannot open files, and it returns hexadecimal output only — no Base64, no HMAC and no salt field. For file checksums use the system tool (sha256sum, shasum, certutil); for HMAC, this site has a separate Hash & HMAC generator.

Large inputs are handled locally — a megabyte is hashed in a few tens of milliseconds — but for very large files a command-line tool is the better fit. One caveat for cross-checking: a browser textarea normalizes CRLF line endings to LF, so text pasted from a Windows file is hashed in its LF form, while the file on disk would include the CR bytes and produce a different digest.

Recent tools: