Hash Generator (SHA)

Create SHA-1, SHA-256, SHA-384 or SHA-512 hashes of any text.

How to use

  1. Enter the text to hash.
  2. Pick an algorithm.
  3. Press Generate Hash.

Good to know

Hashing is one way and cannot be reversed. SHA-1 is considered weak, so prefer SHA-256 or stronger. For passwords use a slow dedicated password hash, not a plain SHA.

How Do You Generate a SHA-256 or SHA-512 Hash of Text Online?

A free online SHA hash generator turns any text into a fixed-length fingerprint called a hash or digest. Paste your text, choose SHA-256, SHA-1, SHA-384 or SHA-512, press the button, and the lowercase hexadecimal result appears. The calculation uses the Web Crypto API built into your browser, so your text never leaves your device.

What Does the Hash Generator Do and Why Is It Useful?

A cryptographic hash function takes input of any length and produces output of a fixed length. The same input always gives the same output, while even a one-character change produces a completely different result. Hashes cannot be reversed in any practical way, which makes them useful as fingerprints.

People use SHA hashes to check that a file or message has not changed, to compare two pieces of text without reading them, to create stable identifiers, and to follow along with tutorials on security and programming. This tool lets you see the result for any text instantly, without writing code or installing software.

Which Algorithms Does the Tool Offer?

AlgorithmOutput length in hex charactersOutput size in bits
SHA-140160
SHA-25664256
SHA-38496384
SHA-512128512

SHA-256 is a common default. SHA-1 is included because older systems and examples still use it, but it is considered weak for security purposes. MD5 is deliberately not offered.

How Does the Tool Work Under the Hood?

When you press the button, the script converts your text into bytes using UTF-8 encoding. Plain English letters take one byte each, while accented letters and symbols take more. The bytes are passed to the browser's Web Crypto API, which computes the chosen SHA function. The resulting bytes are then written out as lowercase hexadecimal, two characters per byte.

Because the hash covers every byte, details you cannot easily see matter: capital letters, spaces at the end, and line breaks inside the textarea all change the result. Nothing is calculated until you press the button, and changing the text or algorithm afterwards does not update the shown hash until you press it again.

How Do You Use the Hash Generator Step by Step?

  1. Type or paste your text into the textarea.
  2. Choose an algorithm: SHA-256, SHA-1, SHA-384 or SHA-512.
  3. Press the Generate Hash button.
  4. Read the hexadecimal result and select it to copy it.
  5. To compare against a published value, check every character. The two should also have the same length, and the Character Counter can confirm that.

What Do Real Examples Look Like?

These results were computed independently and you can reproduce them in the tool.

Example 1: SHA-256 of hello

Input: hello. Algorithm: SHA-256. Result:

2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Example 2: one capital letter changes everything

Input: Hello. Algorithm: SHA-256. Result:

185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969

Changing a single letter from lowercase to uppercase produces a result that shares nothing recognisable with Example 1.

Example 3: a trailing space

Input: hello with one space after the o. Algorithm: SHA-256. Result:

5e3235a8346e5a4585f8c58562f5052b8fe26a3bb122e1e96c76784964dfc461

An invisible space gives yet another unrelated hash, which is a common reason two hashes fail to match.

Example 4: SHA-1 of abc

Input: abc. Algorithm: SHA-1. Result, 40 characters:

a9993e364706816aba3e25717850c26c9cd0d89d

Example 5: SHA-384 of abc

Input: abc. Algorithm: SHA-384. Result, 96 characters:

cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7

Example 6: SHA-256 of an accented word

Input: café. Algorithm: SHA-256. The text is 5 bytes in UTF-8, because the letter e with an accent takes two bytes. Result:

850f7dc43910ff890f8879c0ed26fe697c93a067ad93a7d50f466a7028a9bf4e

What Does the Hexadecimal Output Mean?

A hash is really a string of bytes, and each byte can hold a value from 0 to 255. Hexadecimal is a compact way to write those bytes: each byte becomes two characters drawn from the digits 0 to 9 and the letters a to f. That is why SHA-256, which produces 32 bytes, appears as 64 characters, and why SHA-512, which produces 64 bytes, appears as 128. The tool writes the letters in lowercase. If a document shows the same hash in capitals, the value is identical and only the letter case differs, so convert case before comparing by eye.

How Can You Use a Hash to Compare Two Pieces of Text?

Suppose a colleague sends you a paragraph and a SHA-256 hash that they calculated from it. You paste the paragraph into the textarea, choose SHA-256 and press the button. If your result matches theirs character for character, the text you hold is byte-for-byte the same as theirs. If it does not match, something differs, even if the two texts look identical on screen. The difference could be a space, a different kind of quotation mark, or a line ending. The hash does not tell you where the difference is, only that there is one.

This works in the other direction too. Before sending an important block of text, you can calculate a hash and share it through a different channel. The recipient repeats the steps and compares. It is a simple way to notice accidental edits made along the way.

One more point worth knowing: a hash tells you nothing about how similar two inputs are. Two texts that differ by a single comma produce hashes that look completely unrelated, so you cannot judge closeness by comparing the outputs. Equal or not equal is the only question a hash answers.

What Are Good Tips for Using Hashes?

  • Prefer SHA-256 or stronger for new work. Use SHA-1 only when you must match an older system.
  • When comparing hashes, compare the full string, not just the first few characters.
  • Be careful with hidden characters such as trailing spaces and extra line breaks. If a hash does not match, check for these first.
  • Keep the text exactly as the other side hashed it, including capitalisation and punctuation.
  • If you need a random identifier rather than a fingerprint, the UUID Generator is a better fit.

What Common Mistakes Should You Avoid?

  • Hashing passwords for storage. Plain SHA hashes are fast, which makes guessing attacks easy. Password storage needs a dedicated, deliberately slow method with a unique salt. This tool is not suitable for that purpose.
  • Confusing hashing with encryption. A hash cannot be turned back into the original text. Encryption can. If you need a reversible text format, see the Base64 Encoder and Decoder, which is encoding, not security.
  • Ignoring line breaks. Pressing Enter in the textarea adds a newline character, which changes the hash.
  • Expecting file hashing. The tool hashes text typed or pasted into the box, not files.
  • Assuming a match proves safety. A matching hash shows the content equals what was hashed. It does not show that the source is trustworthy.

Who Uses a Hash Generator?

Developers use it to check expected values in tests and documentation. Students use it to explore how hash functions behave. System administrators use it to compare configuration text. Writers of technical tutorials use it to produce correct sample digests. Curious users simply enjoy watching a tiny edit scramble the result.

Is the Hash Generator Private?

Yes. The tool runs entirely in your browser using the Web Crypto API. The text you enter is processed on your device and is not uploaded, stored or logged. Even so, avoid pasting real passwords or secrets into any online page out of habit.

What Are the Limitations?

  • Only SHA-256, SHA-1, SHA-384 and SHA-512 are offered. There is no MD5 and no other algorithm.
  • It hashes text only, always as UTF-8. It does not hash files.
  • Output is lowercase hexadecimal only. Other formats such as Base64 are not provided.
  • Results appear after you press the button. There is no live updating, no history and no download.
  • It does not verify a hash for you. You compare values yourself.
  • It is not suitable for hashing passwords for storage.

Frequently Asked Questions

What is a hash?

A hash is a fixed-length value calculated from data. The same data always gives the same hash.

Can a hash be reversed?

Not in practice. Hash functions are designed to be one-way, though short or common inputs can be guessed by trying candidates.

Why is MD5 missing?

MD5 is not part of the Web Crypto API and is considered broken for security, so the tool leaves it out.

Which algorithm should I choose?

SHA-256 is a sensible default. Choose SHA-1 only for compatibility, and SHA-384 or SHA-512 if a specification requires them.

Why does my hash not match someone else's?

The usual causes are different capitalisation, a trailing space, an extra line break or a different algorithm.

Is SHA-1 safe?

It is no longer recommended for security uses. It is fine for checking examples or matching old systems.

Does the tool support emoji and accents?

Yes. Text is encoded as UTF-8 before hashing, so such characters are included correctly.

Is a hash the same as encryption?

No. Encryption can be undone with a key. A hash cannot be undone.

Ready to Try It?

Paste your text, pick an algorithm and press the button to see the digest in a moment. Explore other utilities among our free tools.

Scroll to Top