SHA-1 Hash Generator

Generate a SHA-1 hash of any text online instantly — free SHA1 hash generator.

About

About the SHA-1 Hash Generator

SHA-1 produces a 160-bit digest, shown as 40 hex characters. It's the algorithm Git used for commit hashes for years, and it's still fine for spotting accidental file corruption — but it was broken for security purposes back in 2017, when researchers demonstrated two different PDFs with the same SHA-1 hash.

If you're trying to reproduce a Git object ID, note that Git doesn't hash a file's contents on their own: it hashes a short header — the word "blob", the size in bytes and a null byte — followed by the contents, so the SHA-1 of the text here won't match git hash-object. For plain checksums the output matches sha1sum exactly, as long as the input is identical, including any trailing newline.

Choose what to view about this tool

Guide

Using the SHA-1 Hash Generator

  1. 1

    Step 1

    Type or paste your text into the box.

  2. 2

    Step 2

    Click Generate hashes to compute it entirely in your browser, using the Web Crypto API.

  3. 3

    Step 3

    SHA-1 is one of the four results in the table — SHA-1, SHA-256, SHA-384 and SHA-512 are all computed at once.

  4. 4

    Step 4

    Copy the SHA-1 value from the table.

  • Generates a 40-character SHA-1 hash in lowercase hex
  • Hashes the text exactly as typed — spaces, line breaks and capitals all change the result
  • Encodes text as UTF-8, matching sha1sum and most programming languages
  • Shows SHA-1, SHA-256, SHA-384 and SHA-512 together, so you can compare all four
  • Uses your browser's built-in Web Crypto API — the text never leaves your device
  • Free, with no sign-up and no limit on how many hashes you generate

Developers on older systems

Developers check values against systems and APIs that still store SHA-1 checksums.

Git learners

Git users see why a blob ID differs from a plain SHA-1 of the same text.

QA testers

Testers confirm that an app's SHA-1 output for a test string matches the expected value.

Security students

Students compare SHA-1 with SHA-2 output while learning why SHA-1 was retired.

Generate another hash

Examples

SHA-1 Hash Generator examples

2 worked examples

01

Hashing a short word

"hello" hashes to aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d with SHA-1.

02

Hashing an empty input

An empty string always gives da39a3ee5e6b4b0d3255bfef95601890afd80709 — a handy value to recognise in logs.

FAQ

Frequently asked questions

Quick answers to common questions about the SHA-1 Hash Generator.

How do I generate a SHA-1 hash?

Type or paste your text above and click Generate hashes. The SHA-1 value appears in the results table — hashing happens directly in your browser, using the Web Crypto API.

Is SHA-1 free to use?

Yes. It's free, with no sign-up and no limit on how much text you hash.

Is SHA-1 still safe to use?

Not for security purposes. A 2017 attack ("SHAttered") produced two different files with the same SHA-1 hash, so it should not be used for signatures or password storage — SHA-256 is the safer default for anything security-related.

Why does Git still use SHA-1 for commit hashes?

Git originally adopted SHA-1 for content-addressing, not cryptographic security, and the collision risk for accidental hash matches in ordinary code is astronomically small; Git is gradually moving toward SHA-256 support regardless.

Is my text safe when I hash it here?

Yes. Everything runs directly in your browser using the Web Crypto API — nothing is uploaded anywhere.

How long is a SHA-1 hash?

160 bits, shown as 40 hexadecimal characters.

Why does my SHA-1 hash differ from another tool's?

Usually the input isn't exactly the same — a trailing space, a line break or a different text encoding changes the whole hash. This tool hashes your text exactly as typed, encoded as UTF-8.

Can I hash a file with SHA-1?

Not on this page, which hashes text. The File Hash Calculator hashes whole files without uploading them, but it offers SHA-256, SHA-384 and SHA-512 rather than SHA-1.

Does it show other hashes as well?

Yes. One click computes SHA-1, SHA-256, SHA-384 and SHA-512 of the same text side by side, so you can copy whichever one you need.

Still have a question? Contact us

Report a problem

SHA-1 Hash Generator

What went wrong?
    or paste a screenshot