Skip to content

Sha1 Hash Generator

Generate a SHA-1 digest from exact UTF-8 text or local file bytes, with an explicit warning about collision attacks.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Choose UTF-8 text or file bytes and provide the exact input without normalizing whitespace.
  2. 2.Generate the SHA-1 digest and select the Hex or Base64 representation required by the legacy system.
  3. 3.Compare every character through a trusted channel, and use SHA-256 or SHA-512 instead for new security-sensitive work.

About Sha1 Hash Generator

SHA-1 Hash Generator calculates the 160-bit message digest of UTF-8 text or a local file. Enter text directly or choose a file up to 100 MB, then receive the same twenty digest bytes in lowercase hexadecimal and standard padded Base64. Processing happens in the browser tab and the selected file is not sent to the application server.

SHA-1 is defined by the NIST Secure Hash Standard. It pads the input, divides it into 512-bit blocks and updates five 32-bit state words through eighty rounds per block. The final state is 160 bits, displayed here as exactly 40 hexadecimal characters or 28 Base64 characters including any padding.

Text mode encodes the visible string as UTF-8 before hashing. That distinction matters for accented letters, emoji and non-Latin scripts because a character can occupy several bytes. File mode hashes the raw bytes exactly as read. The filename, modification time and browser MIME label are not included in the digest.

An empty text field is a valid message and has the well-known SHA-1 value da39a3ee5e6b4b0d3255bfef95601890afd80709. This is different from having no result: click the button to calculate it. Line endings, spaces and a final newline all participate, so visually similar inputs can correctly produce different values.

The page is useful when a legacy download page, archive catalog or old integration publishes a SHA-1 checksum and you need to compare exact bytes. Generate the local digest and compare every character with the value supplied through a trusted channel. A match can detect accidental transfer damage in that limited workflow.

SHA-1 is collision-broken and must not be selected for new security designs. Attackers can construct different content with the same digest under realistic conditions. Do not treat a SHA-1 match as proof of authorship, use it for signatures, certificate decisions, password storage, adversarial file approval or tamper protection. Prefer SHA-256 or SHA-512 when the protocol allows it.

A plain hash is also not a password hash. Fast general-purpose algorithms let attackers test guesses quickly. Password storage requires a salted, deliberately expensive password-hashing scheme such as Argon2id, scrypt or bcrypt, implemented by the account system. This utility never adds a salt and never derives a key.

The 100 MB limit reflects the browser API used here: the selected input must be available as one byte buffer before the digest operation completes. It is not a streaming command-line replacement for multi-gigabyte images. For larger artifacts, use a trusted local operating-system tool and verify which algorithm and byte sequence it receives.

Eight fixed fixtures cover the empty input, abc, a multi-block standards message, punctuation sensitivity, UTF-8, arbitrary binary bytes and common phrases. Hex values are checked against NIST and RFC material and independently recomputed with OpenSSL. Base64 is tested as an encoding of the same digest bytes, not as a second hashing algorithm.

Use this page only when SHA-1 is the required legacy format. Choose the correct input mode, generate the digest, copy Hex or Base64, and compare without trimming or re-encoding the source. If you control the consuming system, migrate the stored reference to SHA-256 or stronger and publish the checksum over an authenticated channel.

Methodology & sources

UTF-8 text or exact file bytes are passed to the browser SHA-1 digest operation defined by FIPS 180-4. The resulting 20 bytes are encoded independently as lowercase Hex and padded Base64.

Frequently asked questions

Encoding & Crypto guides

View all