Overview / Developer & Code / Text Hash Generator
Developer & Code 100% In-Browser & Offline

Text Hash Generator

Calculate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text while you type.

Paste or type your input; results appear instantly and errors are shown below the input.

Your files and input never leave your browser – nothing is uploaded.

A hash generator with five rows and one text box

A vendor's docs say the SHA-256 of hello starts with 2cf24dba, and your code prints something else. Paste the string into this hash generator and you get a reference value to compare. Five hashes appear together: SHA-256, SHA-512, MD5, SHA-1 and SHA-384. Each has its own row and its own Copy button, and all rows change on every keystroke.

Four steps from text to clipboard

  1. Click the box labelled Input text or string. It starts with Hello World.
  2. Replace the text with your own. The rows fill in at once. An empty box blanks all five.
  3. Find the algorithm you need. MD5 gives 32 hex characters, SHA-1 gives 40, SHA-256 gives 64, SHA-384 gives 96 and SHA-512 gives 128.
  4. Press Copy on that row. The lowercase hex string goes to your clipboard.

The newline that changes your SHA-256

Most mismatches with the terminal come from one invisible byte. Run echo hello | sha256sum and the result differs from the value for hello here. The reason: echo adds a newline, and sha256sum hashes it too. Use printf hello or echo -n hello and the two values agree.

The box has the same trap. Press Enter at the end of your text, or leave a trailing space, and you get a different hash.

What this box does not hash

  • Files. There is no file picker, so you cannot check a downloaded ISO. Use sha256sum, shasum -a 256 or PowerShell Get-FileHash.
  • No HMAC, no salt, no SHA-3, and no switch for uppercase output.
  • The text is encoded as UTF-8 first. A tool that hashes Latin-1 bytes gives a different result for é.
  • MD5 and SHA-1 are broken for collision resistance, so keep them away from anything an attacker can influence. A fast plain hash is also the wrong way to store passwords. Use bcrypt, scrypt or Argon2.
  • SHA-1 to SHA-512 need the Web Crypto API, which browsers offer only on secure pages (HTTPS or localhost).

Where the text goes while it is hashed

Typing sends no request. You can confirm that in the network panel of your developer tools. MD5 comes from a script inside the page, and the other four from the Web Crypto API in your browser. A short or common string still shows up in lookup tables, so a hash does not hide a weak secret.

Frequently asked questions (FAQ)

echo adds a newline to the text, and sha256sum hashes it. Use printf or echo -n, and check that the input box has no trailing space or line break.