Generate a hash from text

Hash a string with SHA-256, SHA-512, SHA-1 or MD5 and copy the result as hexadecimal or Base64.

Generate a hash from text

0 characters

Three steps — nothing to install

  1. Type the text

    A password, a token, a line of data. Everything is hashed as UTF-8.

  2. Pick the algorithm

    SHA-256 by default; SHA-512, SHA-1 and MD5 for compatibility with older systems.

  3. Copy the digest

    Hexadecimal or Base64, ready to compare against a stored value.

What a hash guarantees

A cryptographic hash turns any input into a fixed-length output, and the same input always gives the same output. Change one character and roughly half the output bits change, which is the avalanche property. You cannot work backwards from the digest to the input, which is why hashes are used to store passwords and check files.

Two different inputs producing the same digest is a collision. For SHA-256 and SHA-512 no practical collision is known, which is why they are the defaults here. Hashing is not encryption: there is no key and no way to recover the text, so a hash is a fingerprint, not a locked box.

MD5 and SHA-1 are here for compatibility

Both are broken for anything security-related. Practical collisions for MD5 have existed since 2004 and for SHA-1 since 2017, and password cracking tools compute them by the billion. They are included because old systems still store checksums and password hashes in those formats, and comparing against one is a real task.

Never choose MD5 or SHA-1 for a new signature, password store or integrity check. Use SHA-256, or a dedicated password hash such as Argon2id or bcrypt, which are deliberately slow and salted; a fast hash is the wrong tool for passwords no matter how long the digest.

Text, files and encoding

This page hashes the text in the box as UTF-8 bytes. That matters when comparing with another tool: a hash of café depends on whether the é was encoded as UTF-8 or Latin-1, and on whether a trailing newline was included. If a checksum does not match, check the line ending first.

Hashing a large file needs streaming so the whole file is never in memory at once. Web Crypto can do it with digest on an ArrayBuffer, which means the file is in memory; for a multi-gigabyte ISO, use the operating system's own tool. For keyed hashing, use the HMAC generator.

Frequently asked questions

Can it hash a file?Not on this page; it hashes text. The file checksum verifier hashes a file without uploading it.
Should I use MD5?Only to compare against a legacy checksum. It is broken for security and fast to crack.
What is a salt?Random data added before hashing so identical passwords do not produce identical digests. This tool hashes the text as typed and adds nothing.
Why is my hash different from another site's?Usually encoding: that site may hash Latin-1 bytes or include a newline. UTF-8 of exactly the text shown is used here.
Is the text uploaded?No. SHA is computed by Web Crypto in this tab and MD5 by a small local implementation.
Can I reverse a hash?No. You can only guess inputs and hash them, which is why weak passwords fall and strong ones do not.