Generate

Generate a hash from text

Type or paste text and read its digest in hex.

The digests come from crypto.subtle, the browser’s built-in implementation. No JavaScript written for this page does the hashing, so there is no second implementation to get wrong, and the input never leaves the tab.

The text is encoded as UTF-8 before hashing, which is the encoding every tool you would compare against assumes. The same characters in a different encoding give a different digest, and that is the usual reason two tools disagree on a value.

SHA-1 is included because old checksums and Git object names still use it, not because it is safe: deliberate collisions have existed since 2017, so it must not decide a security question. SHA-256 is the default everywhere else. MD5 is absent because the browser’s crypto does not implement it, and a hand-written MD5 would ask you to trust cryptography written for one page.

Questions

Is hashing the same as encryption?

No. A hash cannot be turned back into the input. Encryption can.

Why is there no MD5?

The browser’s crypto API does not offer it. The alternative would be a JavaScript MD5 written for this page, and a hash you cannot check is worse than no hash.

Can I hash a large file?

This hashes text. A whole file would have to be read and held in the page; this is for strings, tokens and checksums.

Why do I get a different hash than another tool?

Almost always encoding: a trailing newline, or the same characters encoded as something other than UTF-8.

More text and code