Skip to content

SHA-256 hash generator

Free, no sign-up Runs in your browser

Type or paste text and get its SHA-256 hash as hex and Base64 while you type. Computed with Web Crypto in your browser, so the text is never sent anywhere.

Hashed in your browser as UTF-8, exactly as typed: a trailing space or line break changes the hash.

SHA-256 (hex)
The result appears here.
SHA-256 (Base64)
The result appears here.

Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.

How to use the SHA-256 hash generator

  1. Type or paste the text. It is hashed as UTF-8, exactly as entered.
  2. Read the hash as 64 hex characters, or as Base64.
  3. Copy the form you need with the button above it.

About this tool

SHA-256 turns any input, a word or a whole disk image, into 256 bits that act as its fingerprint. The same input always gives the same hash, and changing one character changes about half the bits. It is part of the SHA-2 family standardized by NIST in FIPS 180-4, and it is the hash behind TLS certificates, Git’s newer object format, Bitcoin, package lockfiles and most download checksums.

It is a one-way function. Nobody can work back from a hash to the input, and nobody has found two inputs with the same SHA-256. That makes it right for checking that data has not changed and for building signatures and HMACs. The result is usually written as 64 hex characters; the Base64 form of the same 32 bytes is what Subresource Integrity and some APIs use.

The common mistake is hashing passwords with it. SHA-256 is fast by design, billions of hashes a second on a graphics card, so a database of SHA-256 password hashes is cracked by trying likely passwords. Passwords need a slow, salted function such as Argon2id or bcrypt. Also remember a hash covers the exact bytes: a trailing newline, as echo adds, gives a different result.

Sources

Questions

Can SHA-256 be decrypted or reversed?

No. A hash is not encryption and there is no key. The only way to find an input from its hash is to guess inputs and hash each one, which works for short or common values such as passwords and not for long random ones. Sites that claim to decrypt hashes are looking them up in tables of known inputs.

Is SHA-256 secure?

Yes, for what a hash is meant to do. No collision or preimage attack on the full function is known, and NIST approves it for signatures and integrity. It is not suitable by itself for storing passwords, because it is fast, and a plain hash of a secret plus a message is not a safe MAC: use HMAC for that.

Why is my hash different from the one sha256sum prints?

Nearly always a newline. The command echo "text" | sha256sum hashes the text plus a line break, while this tool hashes exactly what is in the box. Use echo -n or printf to leave the newline out. Different text encodings, such as UTF-16, also give different hashes.

What is the difference between SHA-256 and SHA-2?

SHA-2 is the family; SHA-256 is one member. The others are SHA-224, SHA-384, SHA-512 and two truncated SHA-512 variants. SHA-256 works on 32-bit words and gives 256 bits. SHA-512 works on 64-bit words and gives 512.

Related tools