Hash Generator — MD5, SHA-1 and SHA-256 Online

Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes from text you type or from a file you pick, and read the result as hexadecimal or Base64. The SHA family runs through the browser's built-in Web Crypto API, which is the same implementation your browser uses for TLS; MD5 is implemented here in JavaScript because browsers deliberately no longer offer it. There is also a compare box: paste the checksum a download page published, and the tool tells you whether it matches the file you just hashed. Nothing is uploaded, so you can verify a private file without handing it to anyone.

Hash Generator

Hashing happens on your device, text and files alike.

Encoded as UTF-8 before hashing, which is what every other tool and language does by default.

Output format
Letter case
Hashing…
Click any hash to copy it.
AlgorithmHash
MD5—
SHA-1—
SHA-256—
SHA-384—
SHA-512—

Spaces, line breaks and letter case are ignored, and an algorithm: prefix is stripped automatically.

Runs fully in your browser. Nothing is uploaded.

How to Use the Hash Generator

  1. Type into the text box and every hash updates as you type, or switch to the file tab and drop a file in.
  2. Choose hexadecimal or Base64 output. Hexadecimal is what download pages and most tools publish; Base64 turns up in HTTP headers and some APIs.
  3. Click Copy on any row, or click the hash itself, to put it on your clipboard.
  4. To verify a download, paste the checksum from the publisher into the compare box. A green result means the file is byte-for-byte what they published.
  5. For a file, wait for the spinner to finish before reading the hashes — a large file takes a second or two.

Features

  • Five algorithms at once: MD5, SHA-1, SHA-256, SHA-384 and SHA-512.
  • SHA hashing through the browser's native Web Crypto API, the same code path used for TLS.
  • A complete MD5 implementation in JavaScript, since browsers no longer provide one.
  • Hexadecimal or Base64 output, in upper or lower case, switchable without rehashing.
  • Checksum comparison that ignores spacing, case and algorithm prefixes before judging a match.
  • File hashing with no upload, so you can verify a confidential file without disclosing it.

About This Tool

A hash is a fixed-length fingerprint of some data. Change one byte anywhere in a 4 GB file and the hash changes completely. That property makes hashes the standard way to answer two questions: did this download arrive intact, and are these two files identical?

Which algorithm to use depends on which question you are asking. For checking that a file downloaded correctly, any of them works, and publishers often still list MD5 or SHA-1 because they are fast. For anything where someone might deliberately try to substitute a file, use SHA-256 or stronger. MD5 has been broken since 2004 and SHA-1 since 2017, in the specific sense that attackers can construct two different files with the same hash. Neither should be used for signatures, certificates or password storage.

On password storage specifically: none of these algorithms is suitable. They are designed to be fast, which is exactly wrong for passwords, because speed helps an attacker guessing billions of candidates. Use bcrypt, scrypt or Argon2, all of which are deliberately slow and salted.

The SHA functions here call crypto.subtle.digest, the browser's own implementation. That API is only available in a secure context, so on a plain HTTP page the SHA rows will report that they are unavailable while MD5 still works, since MD5 is computed in JavaScript. On the live site, served over HTTPS, all five work normally.

Frequently Asked Questions

Is my file uploaded to check its hash?

No. The file is read into memory with the browser's File API and hashed in this tab. That is precisely why a browser-based hasher is useful for confidential files — you can verify a download without handing a copy to a third party.

Which hash should I use?

SHA-256 for anything that matters. It is the current default for file verification, software signing and blockchain work. Use MD5 or SHA-1 only to match a checksum a publisher has already given you in that format.

Is MD5 still safe?

Not for security. Researchers have been able to create two different files with the same MD5 hash since 2004, so it cannot prove a file has not been tampered with. It is still fine for detecting accidental corruption, such as a download that was cut short.

How do I verify a downloaded file?

Copy the checksum from the publisher's download page, switch to the file tab, drop your downloaded file in, and paste the checksum into the compare box. If it reports a match, your copy is identical to theirs, byte for byte.

Why are the SHA rows unavailable?

The Web Crypto API only works in a secure context. If you are viewing this page over plain HTTP or opening it from your own hard drive, the browser blocks it. On the live HTTPS site all five algorithms work.

Related Tools

JSON Formatter

Beautify, minify and validate JSON with exact error line and column.

Open JSON Formatter

Word Counter

Count words and characters live with reading time and keyword density.

Open Word Counter

Case Converter

Switch text between upper, title, camel, snake and kebab case instantly.

Open Case Converter

Browse all 20 tools →