Generate SHA-256 Hash Online From Any Text
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from any text.
About Hash Generator
Hash Generator turns any text you type into four fixed-length fingerprints at once: SHA-1, SHA-256, SHA-384 and SHA-512. Each appears in its own read-only row as lowercase hexadecimal and all four refresh as you type. The same text always gives the same hashes, and changing a single character produces completely different ones.
People use it to compare a string against a checksum published with a document or API, to confirm that two pieces of text are identical without reading them, to make a quick cache key or ETag value while developing, or to see how hashing behaves in a computer security class. It hashes text only, so it cannot check a downloaded installer or PDF.
A hash cannot be run backwards to recover the text, but that does not make it a way to store passwords. These algorithms are fast and unsalted, which suits integrity checks and not password storage; for passwords use bcrypt, scrypt or Argon2 on your server. SHA-1 is also weak against deliberate collisions, so choose SHA-256 or longer for security work.
How to use Hash Generator
- Type or paste your text into the box that says "Type or paste text to hash...". Spaces and line breaks count, so enter it exactly.
- Look at the four rows underneath, labelled SHA-1, SHA-256, SHA-384 and SHA-512. They fill in automatically; there is no button to press.
- To copy a value, click inside its row, press Ctrl+A to select it, then Ctrl+C (Cmd on a Mac), because the page has no copy buttons.
- To compare with a published hash, check every character. This tool prints lowercase, but upper and lower case mean the same in hexadecimal.
- Delete the text to clear all four rows.
Tips for best results
- Hashing is exact. A trailing space or an extra blank line changes every result: "abc" and "abc" followed by a line break have completely different SHA-256 values.
- Line breaks in the box are read as a single \n character, so text copied from a Windows file that used \r\n will not hash the same as the original file.
- Text is converted to UTF-8 bytes before hashing. Another program will only produce the same result if it also hashes UTF-8 bytes of identical text.
- An empty box leaves the rows blank rather than showing the hash of an empty string, so this page can't be used to look that value up.
- Do not paste real passwords here to "hide" them. Short or common passwords can be guessed by hashing candidates and comparing, and a plain SHA hash gives them little protection.
Frequently asked questions
Which hash algorithms are supported?
SHA-1, SHA-256, SHA-384, and SHA-512, computed using the browser's native Web Crypto API.
Why isn't MD5 included?
The browser's built-in Web Crypto API does not offer MD5, which is considered cryptographically broken. SHA-256 and the other SHA-2 hashes above are the recommended choice.
Can I hash a file with this tool?
No. It only hashes text typed or pasted into the box, and there is no file picker. A file's checksum needs the file's raw bytes, so it cannot confirm a downloaded installer or document.
Can a hash be turned back into the original text?
No, hashing is one-way. Short or predictable inputs can still be found by hashing guesses until one matches, which is why plain hashes are not enough for passwords.
Which of these algorithms should I use?
SHA-256 is a sensible default for fingerprints and integrity checks; SHA-384 and SHA-512 simply give longer outputs. SHA-1 is here for compatibility with older systems and should not be used where an attacker could craft collisions.
Why do my results differ from a command-line tool or another website?
The usual causes are a hidden trailing newline, different line endings or a different text encoding. This page hashes the UTF-8 bytes of exactly what is in the box, with line breaks as \n.