SHA-1 Hash Generator

Compute the SHA-1 digest of any text — hex or base64 output, uppercase option, and hex/base64 input decoding. Runs entirely in your browser, no server, no sign-up.

SHA-1 digest

About this tool

This SHA-1 hash generator computes the SHA-1 digest of any text right in your browser. The hashing runs locally in WebAssembly — your input is never uploaded to a server, which makes it safe for keys and other sensitive strings.

SHA-1 produces a fixed 160-bit (20-byte) digest, shown as 40 hexadecimal characters. It is still widely seen in Git object IDs, legacy file checksums, TLS fingerprints, and older protocol interop, so a quick SHA-1 is handy when matching or verifying those values.

Options

Notes

FAQ

Why does my digest differ from `echo "text" | sha1sum`?

echo appends a newline, so the shell hashes text\n while this tool hashes exactly the characters you typed. Use printf '%s' "text" | sha1sum to compare like for like — a single extra byte changes the whole digest.

Why doesn't my hash match a Git object ID for the same content?

Git doesn't hash the raw content — it hashes blob <length>\0 followed by the content. To reproduce a Git blob ID here, prepend that header yourself (or use git hash-object); hashing the bare text will always give a different digest.

How do I hash raw bytes, like a key or ciphertext?

Set Interpret input as to hex or base64. The input is then decoded to its raw bytes before hashing, so the digest matches what you'd get hashing the original binary — not the textual encoding of it.

Is SHA-1 still okay to use?

Not for security: practical collision attacks have existed since the 2017 SHAttered result, so avoid it for signatures, certificates, or anything adversarial (use SHA-256). It remains fine for matching legacy values — Git IDs, old checksums, TLS fingerprints — where you just need the same 40-hex digest another system produced.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool sha1-hash "Hello, world!"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/sha1-hash/?text=Hello%2C%20world%21&input_encoding=text&output_format=hex&uppercase=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.