Hash Generator
Published Updated
Get the MD5, SHA-1, SHA-256 and SHA-512 hashes of typed text or any file in one run, as lowercase hex that you copy one at a time or all four together.
Four digests from one press
There is no algorithm menu: every run returns MD5, SHA-1, SHA-256 and SHA-512 of the same bytes. The three SHA values come from the browser's crypto.subtle.digest, which also offers SHA-384, not shown here. Web Crypto has no MD5, so the page runs its own implementation of RFC 1321. It matched Node's crypto module on 301 test inputs, from empty up to 9 MB.
Text is hashed as the UTF-8 bytes of what the box holds. Nothing is trimmed, so text that looks the same can still hash differently, as the examples below show.
One input, four results
The text hello world, 11 bytes with no line break at the end:
| Algorithm | Hex digits | hello world | Status |
|---|---|---|---|
| MD5 | 32 (128 bits) | 5eb63bbbe01eeed093cb22bb8f5acdc3 | Matching old checksums only; collisions are cheap (RFC 6151) |
| SHA-1 | 40 (160 bits) | 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed | Legacy: NIST asks for it to be phased out by 31 December 2030 (NIST, 2022) |
| SHA-256 | 64 (256 bits) | b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 | SHA-2 family, which NIST names as a replacement |
| SHA-512 | 128 (512 bits) | 309ecc489c12d6eb4cc40f50c902f2b4..., first 32 digits | SHA-2 family, longer output |
Add one line break after the text and the input becomes 12 bytes; its MD5 is 6f5902ac237024bdd0c176cb93063dc4, nothing like the first. The word café typed with a single é is 5 bytes, while café with e plus a combining accent is 6, and the two get different hashes although they look identical on screen.
Checked against the published test vectors
The MD5 test suite of RFC 1321 and SHA tests 1 to 4 of RFC 6234 went through the text box, and the four results were compared with the values the documents print. The runs used Google Chrome 157, Firefox 155 and Playwright's WebKit build (not the Safari app); all three gave the same digests.
| Source | Test inputs | Matches in each browser |
|---|---|---|
| RFC 1321, MD5 test suite | 6 strings, from a to 80 digits | 6 of 6 |
| RFC 1321, MD5 test suite | the empty string | cannot be entered (see the limits below) |
| RFC 6234, SHA-1 tests 1 to 4 | abc, a 56-character string, one million a, 640 digits | 4 of 4 |
| RFC 6234, SHA-256 tests 1 to 4 | abc, a 56-character string, one million a, 640 digits | 4 of 4 |
| RFC 6234, SHA-512 tests 1 to 4 | abc, a 112-character string, one million a, 640 digits | 4 of 4 |
The one million a also went in as a 1,000,000-byte file, with the same SHA-256 the RFC prints, cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0. The digests below and those of the timing files were also recomputed with the crypto module of Node.js 22.23.1: all 61 checked values per browser, byte counts and digests, were equal.
Line breaks, spaces and look-alike characters
What reaches the hash is the UTF-8 bytes of the box. These inputs look alike or nearly alike on screen; Chrome 157, Firefox 155 and the WebKit build gave identical results for every row:
| Text in the box | UTF-8 bytes | MD5 |
|---|---|---|
| hello world | 11 | 5eb63bbbe01eeed093cb22bb8f5acdc3 |
| hello world, then a line break | 12 | 6f5902ac237024bdd0c176cb93063dc4 |
| hello world, then a space | 12 | 60c08e2b03b716a176aeb9c2a2fddb79 |
| hello and world joined by a no-break space | 12 | 3152e418d32f7b9eabe3784885c2aaf8 |
| hello and world joined by a zero-width space | 13 | 57b98e1c99bb237f59c17e013f9cf868 |
| a byte order mark, then hello world | 14 | 4b358703d84aadee54df4661a9b5cfcb |
| café with a single é | 5 | 07117fe4a1ebd544965dc19573183da2 |
| café with e and a combining accent | 6 | 10a85865ce7a7d2f0dc3faf37c617a8d |
| 日本語 (3 characters) | 9 | 00110af8b4393ef3f72c50be5b332bec |
| 😀 (one emoji) | 4 | 2a02eac39d716a70ecf37579185927b6 |
| 👍🏽 (thumbs up with a skin tone) | 8 | e5310bffd740c9e4a639b507c09b274a |
Line endings depend on the browser. In Chrome 157 and Firefox 155 the box handed the page LF line breaks: two lines given Windows CRLF or old Mac CR breaks, set by script or inserted as typed input, came back as 11 bytes with MD5 ee5a58024a155466b43bc559d953e018, the same as pressing Enter between them. In the WebKit build, inserted text kept its CRLF (12 bytes, 133faf504928b85572d6aae8fff988aa) and its CR.
File mode hashes the bytes as they are in every browser: the same two lines as a CRLF file give 133faf504928b85572d6aae8fff988aa, as an LF file ee5a58024a155466b43bc559d953e018. When a checksum has to match a file, hash the file, not text copied out of it.
How long large files take
Random files generated in the page, timed from pressing Generate Hashes until all four results showed, median of 3 runs (1 MB = 1,048,576 bytes):
| File size | Chrome 157 | Firefox 155 | WebKit build |
|---|---|---|---|
| 1 MB | 32 ms | 27 ms | 23 ms |
| 10 MB | 246 ms | 212 ms | 151 ms |
| 100 MB | 2.6 s | 2.9 s | 1.6 s |
Most of that time is MD5, which runs as the page's own JavaScript. On the 100 MB file MD5 alone took 2,194 ms in Chrome 157, 2,155 ms in Firefox 155 and 1,439 ms in the WebKit build; SHA-256 through crypto.subtle.digest took 66, 131 and 52 ms.
Hashing text or a file
Step 1
Pick Text or File
Switching modes clears the last results. Text mode hashes exactly what is in the box, spaces and line breaks included.
Step 2
Press Generate Hashes
All four algorithms run together on the same bytes. A large file shows a spinner while MD5 works through it in 4 MB slices.
Step 3
Copy a hash
Each row has its own Copy button. Copy All gives four lines in the form MD5: followed by the hex value.
Limits worth knowing
- Files are read whole with
file.arrayBuffer()before any hashing, so very large files depend on the device's memory. MD5 runs as a JavaScript loop that pauses between 4 MB slices so the page keeps responding. - Zero bytes cannot be hashed here: with the box empty, Generate Hashes stays disabled, and a 0-byte file is turned away with One or more files were empty (0 bytes) and couldn't be used. For reference, RFC 1321 lists the MD5 of the empty string as
d41d8cd98f00b204e9800998ecf8427e. - No SHA-384, SHA-3, CRC32 or keyed hash is offered. For a keyed digest use HMAC Generator; to compare a file against a published value, Checksum Verifier takes the expected checksum and does the comparison.
- Not for storing passwords. NIST SP 800-63B requires passwords to be salted and hashed with a password hashing scheme that has a cost factor; Bcrypt Generator makes that kind of hash.
Hashing questions
Why does my hash not match the one on the download page?
Check the length first: 32 hex digits is MD5, 40 is SHA-1, 64 is SHA-256 and 128 is SHA-512. If the length matches and the digits do not, the files differ, usually because the download stopped early or a different version was fetched. For text, a stray space or line break is the common cause.
Is MD5 still safe to use?
For catching accidental damage, it still works. Against someone trying to fool you, it does not: RFC 6151 reported in 2011 that an MD5 collision could be found in about a minute on a notebook, so two different files can be made to share one. Use SHA-256 when the checksum guards against tampering.
Can a hash be turned back into the text?
Not by any formula. Short or common inputs can still be found by hashing guesses until one matches, which is why passwords need a salted, deliberately slow scheme such as bcrypt and not a plain MD5 or SHA-256.
Do capital letters in a hash matter?
No. A hex digit means the same value in either case, so 5EB63BBB and 5eb63bbb are equal. This page always prints lowercase; compare without regard to case.
How large a file can I hash?
There is no set cap. The whole file is loaded into memory before hashing, so the limit is the memory the device has spare. When reading fails, the page says Something went wrong reading or hashing this file.
Is my file uploaded?
It is processed in your browser; this page does not upload it. The browser reads the file into the page, where the SHA values come from the built-in Web Crypto API and MD5 from the page's own code, and the tool's code makes no network request.
Why does text copied from a Windows file hash differently from the file?
Windows ends each line with two bytes, CR and LF. In Chrome 157 and Firefox 155 the text box hands the page LF only, so two lines with a CRLF break are 12 bytes as a file (MD5 133faf504928b85572d6aae8fff988aa) but 11 bytes once in the box (ee5a58024a155466b43bc559d953e018). Switch to File mode to hash a file's exact bytes.
Does a byte order mark change the hash?
Yes. A UTF-8 byte order mark is three bytes, EF BB BF, at the start of a file. hello world is 11 bytes with MD5 5eb63bbbe01eeed093cb22bb8f5acdc3; with a byte order mark it is 14 bytes and 4b358703d84aadee54df4661a9b5cfcb. That holds in File mode and when the text in the box starts with the mark, where it stays invisible.
How long does a 100 MB file take?
In our runs on a generated 100 MB file the median was 2.6 seconds in Chrome 157, 2.9 seconds in Firefox 155 and 1.6 seconds in the WebKit build. MD5 alone took 1.4 to 2.2 seconds of that, while SHA-256 alone took 52 to 131 ms.
Why can't I hash an empty file?
The file picker refuses 0-byte files with One or more files were empty (0 bytes) and couldn't be used, and Generate Hashes stays disabled while the text box is empty. The values are fixed anyway: RFC 1321 gives d41d8cd98f00b204e9800998ecf8427e as the MD5 of the empty string.