Hash Generator

Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text — privately in your browser.

Runs in your browserUpdated Built and maintained by Leon and Henrik

Type or paste text to see its SHA-1, SHA-256, SHA-384 and SHA-512 hashes update live. Free. No sign-up. Runs in your browser, nothing is uploaded.

Hash Generator

Hashes

Enter text above to see its SHA-1, SHA-256, SHA-384 and SHA-512 hashes.
Runs in your browser
Nothing is uploaded

Type or paste text and four digests appear as you type: SHA-1, SHA-256, SHA-384 and SHA-512, each in lowercase hex with its own Copy button. The text is encoded as UTF-8 before hashing, which is what nearly every library, API and command-line tool expects.

Same text, completely different hash

Change one character — or add an invisible line break — and the whole digest changes. These are the SHA-256 values this tool shows:

InputSHA-256
hello2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Hello185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
hello + line break5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03
(empty text)e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

The third row explains most "the hashes don't match" problems. If you paste text that ends with Enter, the newline is part of the input. The empty-text hash is also worth recognising: if you ever see e3b0c442… in a log, something hashed nothing at all. (This tool simply shows no output for empty input.)

The four algorithms compared

AlgorithmDigest lengthHex charactersStatusWhere you'll meet it
SHA-1160 bits40Broken for security: practical collisions were demonstrated in 2017Older systems; Git's default object IDs
SHA-256256 bits64Current standardDownload checksums, TLS certificate signatures, Bitcoin, API request signing
SHA-384384 bits96CurrentSome TLS cipher suites and government specs; also immune to length-extension attacks
SHA-512512 bits128CurrentSpecs that ask for it; often faster than SHA-256 on 64-bit CPUs

If nothing tells you otherwise, use SHA-256. Pick SHA-384 or SHA-512 when a specification asks for it. Keep SHA-1 for comparing against existing values in legacy systems only.

Checking a download against its published checksum

A project publishes sha256: 9f86d081… next to a file. To check your copy:

  1. Hash the file on your own computer — this page hashes text, not files:
    • Linux: sha256sum installer.iso
    • macOS: shasum -a 256 installer.iso
    • Windows PowerShell: Get-FileHash installer.iso -Algorithm SHA256
  2. Compare the result with the published value. Paste both into the Text Diff tool if you don't want to compare 64 characters by eye; case doesn't matter, but PowerShell prints uppercase.
  3. A match means the file is byte-for-byte what the publisher hashed. It proves integrity, not trustworthiness — if the website itself was compromised, the attacker could change both file and checksum.

Hashes are not encryption, and not password storage

  • Encryption is reversible with a key. Hashing isn't reversible at all. Base64 is neither — it's an encoding anyone can undo; see Base64 Encoder / Decoder.
  • Don't store passwords as plain SHA-256. It's designed to be fast, which helps attackers try billions of guesses. Password storage needs a slow, salted algorithm built for it: Argon2id, bcrypt, scrypt or PBKDF2.
  • Don't use a bare hash as a signature. To prove a message came from someone with a secret key, the right construction is an HMAC (for example HMAC-SHA256), not SHA-256(secret + message).

Practical uses for a text hash

  • Comparing secrets without showing them. Two people can each hash a key or config value and compare the first 8 characters of the digest.
  • Cache keys and ETags. A hash of the content makes a stable, fixed-length key.
  • Spotting changes. Store a digest of a template or config snippet; if the digest changes later, so did the text.
  • Test vectors. When you implement hashing in your own code, compare your output for a known input against this page.

For random identifiers rather than fingerprints of existing content, use the UUID Generator.

Frequently asked questions