Dev Tools
All tools

Hash Generator

Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text as hexadecimal. Powered by the Web Crypto API.

100% in-browser
MD5 is not supported. The browser's standard Web Crypto API (crypto.subtle) does not provide MD5, which is no longer recommended for security. For integrity checks or security purposes, use SHA-256 or stronger.

A hash function is a one-way function that turns an input of any length into a fixed-length value. The same input always produces the same hash, but you cannot recover the original input from the hash. Because of this, hashes are widely used for verifying file integrity, detecting data changes, digital signatures, and password storage (together with a salt). Enter some text and this tool computes all four hashes — SHA-1, SHA-256, SHA-384, and SHA-512 — at once, as hexadecimal.

Each algorithm produces a different output length. SHA-1 yields 160 bits (40 hex digits), SHA-256 yields 256 bits (64 digits), SHA-384 yields 384 bits (96 digits), and SHA-512 yields 512 bits (128 digits). A longer output lowers the chance of a collision (two different inputs producing the same hash), making it more secure. With the same algorithm, changing even a single byte of input produces a completely different result — a property known as the avalanche effect.

The computation runs through the browser's built-in standard Web Crypto API (crypto.subtle.digest), so it is fast and needs no external library, and the text you enter is never sent to a server. You can safely check the hash of sensitive strings such as passwords or tokens. Results are shown in a monospace font with a copy button for each algorithm.

How to Use

  1. 1

    Enter text

    Paste the string you want to hash into the input box. Unicode such as Korean characters and emoji is handled correctly as UTF-8.

  2. 2

    Generate hashes

    Press the 'Generate hash' button to compute all four SHA algorithms simultaneously.

  3. 3

    Check the results

    The SHA-1, SHA-256, SHA-384, and SHA-512 results are each shown as a hexadecimal string.

  4. 4

    Copy

    Use the copy button next to the algorithm you need to grab the hash value to your clipboard.

When It's Useful

Verify a downloaded file's integrity

Compare the SHA-256 checksum published by the distributor against the hash you compute yourself to confirm the file was not tampered with or corrupted.

Detect data changes

Store the hash of previous data and compare it with the hash of the new value to tell whether the content changed, without comparing everything.

Check cache key / ETag generation

When building logic that hashes content to use as a cache key or ETag, quickly confirm whether the expected hash value comes out.

Debug API signatures

When working with HMAC or request signatures, hand-compute the reference SHA hash value and cross-check it against the server implementation.

Tips

  • SHA-256 is the most commonly used algorithm for file integrity checks.
  • To store passwords, do not use a plain SHA hash — use a salt together with a dedicated algorithm such as bcrypt, scrypt, or Argon2. SHA is too fast and thus vulnerable to brute-force attacks.
  • SHA-1 has demonstrated collision attacks and is not recommended for security purposes. Use SHA-256 or stronger except for compatibility checks.
  • The same input always produces the same hash, so you can use hashes to compare whether two pieces of data are identical.
  • You can gauge the algorithm from the hex output length: 64 digits means SHA-256, and 128 digits means SHA-512.
  • Even a single invisible newline or space at the end of the input completely changes the hash. If your result differs from another tool, suspect the input first.

FAQ

Can it generate MD5 too?

No. The browser's standard Web Crypto API does not provide MD5, which is no longer recommended for security. This tool supports the SHA family only, and SHA-256 or stronger is recommended for security purposes.

Is the text I enter sent to a server?

No. All hash computation happens inside the browser via the Web Crypto API, and your input is never sent anywhere.

Can I recover the original text from a hash?

No. A hash is a one-way function, so you cannot reverse the input from the result. That said, short or common values can be guessed with a dictionary attack (rainbow table).

Are Korean characters hashed correctly?

Yes. The input is converted to UTF-8 bytes with TextEncoder before hashing, so all characters — Korean, emoji, and more — are handled consistently.

Why is the hash different from another site for the same text?

It may be due to differences in line breaks, spaces, or encoding. Check for an invisible trailing newline or the encoding (whether it is UTF-8).

Should I use SHA-256 or SHA-512?

SHA-256 is enough for most purposes. SHA-512 has a longer output, giving a larger theoretical safety margin and potentially faster performance on 64-bit systems, but SHA-256 is the de facto standard for typical integrity verification.

Does the hash length depend on the input length?

No. A hash always produces an output of the same length whether the input is one character or several megabytes. SHA-256 is always 64 hex digits.

Can I hash files?

This tool hashes text input. If you need the hash of a file itself, files often cannot be treated as text, so it is more accurate to use a command-line tool from your operating system (such as shasum).

Related Tools