Skip to main content
Tools Star Hub

Developer Tools

How to Hash Text with SHA-256, SHA-384, or SHA-512

By Tools Star Hub Editorial Team · Published · Updated

A hash is a fixed-length fingerprint of the text you paste. The Hash Generator offers SHA-256, SHA-384, and SHA-512 through Web Crypto in the browser. SHA-256 of the letters abc is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. The same text and the same algorithm always return that same lowercase hex. The page cannot turn the hex back into the original text.

A hash is useful when you need to check that a snippet has not changed. Change one character and the hex changes. MD5 and SHA-1 are not offered here. They are legacy hashes and a poor choice for a new integrity check. This page does not encrypt the text, store a password, or look up breaches.

What do SHA-256, SHA-384, and SHA-512 change?

SHA-256 is 64 hex characters, which is 32 bytes. SHA-384 is 96 hex characters. SHA-512 is 128 hex characters. A longer digest is a longer fingerprint of the same UTF-8 bytes. It is not a different kind of secret, and it is not reversible on this page.

SHA-256 of hello is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. SHA-256 of an empty box is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. Empty text is allowed. That value is the hash of no bytes, not an error message.

How to Hash Text with SHA-256, SHA-384, or SHA-512 — Tools Star Hub

Which bytes does the hash actually use?

The page encodes the text as UTF-8 before hashing. A trailing space, a different line ending, or an accented letter changes the bytes, so the hex changes. If you copied the text from a document, check for a space at the end before you decide two hashes disagree.

Pasting the characters of a file hashes those characters, not the file bytes on disk. A PDF or an image is not plain text. Hashing a filename is not the same as hashing the file. Compare the full hex. Two different texts can share a short prefix by chance.

How is a hash different from encryption and Base64?

Encryption is meant to be reversed with a key. A hash on this page is one way. Base64 is also reversible. It is an encoding, not a fingerprint. Use Base64 when you need ASCII that can be decoded later. Use a hash when you need to check that two copies match.

This generator does not add a salt, and it does not compare the text with a breach list. Do not treat the hex as a stored password. If you need a new password, use a generator. If you want to rate a password you already typed, use the strength checker. Neither of those pages is a hash of the password.

How to hash text

  1. Paste the exact text. Include the spaces and line breaks you want counted. The box can be empty. An empty box still produces a hash of no bytes.
  2. Choose SHA-256, SHA-384, or SHA-512. SHA-256 is the usual choice for a short integrity check. The other two only change the length of the hex.
  3. Press Create hash. The work runs in this browser tab with Web Crypto. The hex is lowercase. If this browser has no Web Crypto, the page says so and does not invent a result.
  4. Copy the full hex. Compare every character with the other copy. A matching prefix is not enough.

Example

SHA-256 of abc

The letters abc, with no quotes and no trailing space, hash to ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. That is 64 hex characters.

SHA-256 of hello

hello hashes to 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Add a space, or change the capital letter, and the hex will not match.

Common mistakes

A space is part of the input

abc and abc with a trailing space are different texts. Hash both sides the same way before you call them a mismatch.

The hex is not a password

The page does not salt the text, and it does not check whether the text has appeared in a breach. It only fingerprints what you pasted.

FAQ

Can I reverse a SHA-256 hash on this page?
No. The Hash Generator only turns text into hex. It has no key and no reverse step. Base64 can be decoded. A hash cannot.
Why is the empty box still a hash?
Empty text is zero bytes, and SHA-256 of zero bytes is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. The page does not treat an empty box as an error.
Does a longer algorithm hide the text better?
No. SHA-384 and SHA-512 only produce a longer fingerprint. None of the three algorithms encrypts the text or stores it.
Will the same text always match?
Yes, for the same algorithm and the same UTF-8 bytes. A different line ending or a trailing space is a different input.
Is the text sent to a server?
Hashing runs in your browser with Web Crypto. Tools Star Hub does not receive the text as part of creating the hash.

To fingerprint a snippet with SHA-256, SHA-384, or SHA-512, use the Hash Generator. It runs in the browser and returns lowercase hex.

If you need reversible ASCII instead of a fingerprint, read What is Base64?.

For a new password, see How to generate a password.