Free tool · Developer tools
SHA-256 generator
Get the SHA-256 hash of any text or file, and also SHA-1, SHA-384 and SHA-512, as hex or Base64. Paste the hash you expect to see whether it matches. Text and files are hashed on your device and never uploaded.
- Free
- No sign-up
- Runs in your browser
SHA-256256 bits, 64 hex characters
- UTF-8 text, 11 bytes
| Algorithm | Hash |
|---|---|
| SHA-256 | b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 |
| SHA-1 | 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed |
| SHA-384 | fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd |
| SHA-512 | 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f |
- Input size
- 11 bytes
- Source
- Text
- Hashed in
- under 1 ms
How to use the Hash Generator
- Under What do you want to hash? choose Text and type or paste it, or choose A file and pick one. Files are read on your device.
- Pick the Algorithm (SHA-256, SHA-1, SHA-384 or SHA-512) and the Output: hex in lower or upper case, or Base64. The table shows all four algorithms at once.
- To check a download or a message, paste the hash you expect into Expected hash to compare with. The result says Match or No match.
- Press Copy or Download to keep the hash.
How do I generate a SHA-256 hash of text or a file?
Choose Text, type or paste the text, and the hash appears as you type. The text is turned into bytes as UTF-8 before it is hashed, so "hello world" gives b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9, the same value any other tool gives for those 11 bytes. Change one letter and the whole hash changes: "Hello world" gives 64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c. An empty box is valid input too, and its SHA-256 is e3b0c442…b855.
Choose A file to hash a file. Your browser reads it and the hash is computed in the page by the browser's built-in Web Crypto code, so nothing is uploaded. The browser hashes the whole file in memory at once, so files over 256 MB are refused with a message rather than freezing the tab. A SHA-256 is always 256 bits: 32 bytes, written as 64 hex characters or 44 Base64 characters, however large the input is. SHA-1 gives 40 hex characters, SHA-384 gives 96 and SHA-512 gives 128. Text typed in a box uses line breaks as you typed them, and a file is hashed byte for byte.
How do I verify a file checksum?
Hash the file here, then paste the checksum the publisher lists into Expected hash to compare with. The tool reads the algorithm from the length (64 hex characters means SHA-256), accepts upper or lower case, Base64, a sha256: prefix, and the whole line that sha256sum prints, hash filename. The result says Match when the two are identical. When they differ, it names the first character where they part, which helps you tell a damaged download (the hashes look nothing alike) from a typing slip.
A matching hash shows the file is the same as the one the checksum was made from. It only helps if the checksum came from a source you trust, and from a different place than the file itself: someone who can replace the file can often replace the checksum next to it.
For text, a mismatch is often a hidden line break. The command echo hello hashes hello followed by a line break, while echo -n hello does not. When your text does not match but would match with a line break added or removed, CRLF line endings, or extra spaces trimmed, a chip tells you which one.
What is the difference between MD5, SHA-1 and SHA-256?
They are different hash functions with different output sizes: MD5 makes 128 bits, SHA-1 160 bits and SHA-256 256 bits. Longer output and a newer design make SHA-256 the usual choice today. NIST announced in December 2022 that SHA-1 is being retired and recommended moving to SHA-2 (which includes SHA-256, SHA-384 and SHA-512) or SHA-3, with SHA-1 phased out by the end of 2030. MD5 is older and weaker still. This tool offers SHA-1 so you can check an older checksum, but not MD5, which the browser's built-in Web Crypto does not provide. Use SHA-256 or stronger for anything new.
Is SHA-256 reversible, and is a hash encryption?
No to both. A hash is a one-way fingerprint: it has no key and nothing in it to decrypt, and a 32-byte result cannot hold a large input. What can be done is guessing: anyone can hash a list of likely inputs and compare. So a short or predictable input, such as a common password, is not protected by a plain SHA-256. Do not store passwords with it: use a slow, salted password-hashing function made for the purpose. This page has no lookup table and no cracking feature; it only computes hashes of what you give it.
Use it with
- Base64 Encoder Decoder: encode or decode Base64.
- Password Generator: strong random passwords.
- JWT Decoder: decode a JWT locally.
Questions
How do I generate a SHA-256 hash of text or a file?
Type or paste the text, or choose a file. The SHA-256 appears at once, as hex or Base64, with SHA-1, SHA-384 and SHA-512 in the table below it.
How do I verify a file checksum?
Hash the file, then paste the published checksum into the expected hash box. The result says Match or No match, and where the two first differ.
What is the difference between MD5, SHA-1 and SHA-256?
They are different hash functions with 128, 160 and 256-bit results. SHA-1 is being retired by NIST, so use SHA-256 or stronger for new work. MD5 is not offered here.
Is SHA-256 reversible?
No. It is a one-way function with no key. Only guessing the input and hashing it again can find a match, which is why plain SHA-256 is a poor way to store passwords.
Why does my hash not match one made on the command line?
Usually a line break: echo adds one at the end, and a text box does not. The tool tells you when adding or removing a line break, CRLF line endings or trimmed spaces would make it match.
Is my file uploaded?
No. The file is read by your browser and hashed by its built-in Web Crypto code, and nothing is sent anywhere.
Sources
How this page was made: the tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations were drafted with AI help and checked against the tool's own output.