SHA-1 generates one 160-bit digest, which can be displayed as exactly 40 lowercase Hex characters or 28 padded Base64 characters.

That compact rule is the basis of this cheat sheet, but the input bytes determine the result. The same visible words, a file’s contents, and a published checksum can all look plausible while referring to different data. Exactness matters more than visual similarity.

Use the Sha1 Hash Generator when a legacy download page, archive catalog, or old integration explicitly expects SHA-1. Processing takes place in the browser tab, and the selected file is not sent to the application server. This is a compatibility and limited accidental-transfer check, not a tool for collision-sensitive security.

sha1 hash generator cheat sheet
SHA1 Hash Generator Cheat Sheet: Inputs, Outputs, Limits

Quick Reference: Inputs, Outputs, and Limits

Keep these facts in view while generating or checking a legacy SHA-1 value.

ItemQuick answer
Supported inputExact UTF-8 text or the raw bytes of one local file
Digest size160 bits, or 20 digest bytes
Hex outputExactly 40 lowercase characters
Base64 outputExactly 28 characters, including padding
Processing locationIn the browser tab; the selected file is not sent to the application server
File limitUp to 100 MB, with the input available as one byte buffer before hashing completes
Appropriate roleLegacy checksum compatibility and limited accidental-transfer checks
Security statusCollision-broken; do not use for new security-sensitive designs

SHA-1 pads the input, divides it into 512-bit blocks, and updates five 32-bit state words through 80 rounds per block; the final state is 160 bits. RFC 6234 describes the SHA-1 computation. The browser operation defined by FIPS 180-4 receives UTF-8 text bytes or exact file bytes, and the resulting 20 bytes are encoded independently as lowercase Hex and padded Base64.

Generate and Verify a Legacy Checksum

Follow this order to avoid hashing the wrong representation or changing the source bytes.

  1. Confirm the requirement. Check that the receiving system actually expects SHA-1, and determine whether its published checksum uses Hex or Base64. For a new security-sensitive design, use SHA-256 or SHA-512 instead.
  2. Choose the matching input mode. Select UTF-8 text for an exact string or file bytes for an exact artifact. The same visible content can have different byte sequences depending on line endings, encoding, or surrounding content.
  3. Select the source without editing it. Keep spaces, line endings, and any final newline intact. For file mode, choose a local file no larger than 100 MB; its bytes will be hashed exactly as read.
  4. Generate and copy the digest. Click the Generate button, then copy the Hex or Base64 representation required by the legacy system. An empty text field is a valid message, but it produces no result until the button is clicked.
  5. Verify against a trusted reference. Obtain the expected checksum through a trusted channel and compare every character, including padding and case. A match can detect accidental transfer damage in that limited workflow.
  6. Resolve a mismatch without altering the source. Recheck the input mode, representation, encoding, and source version. Do not remove spaces, change line endings, or edit the file merely to force a match.

Preserve the Exact Input Bytes

Text mode encodes the visible string as UTF-8 before hashing. A character can occupy several bytes, so accented letters, emoji, and non-Latin scripts must be preserved exactly. File mode follows a different rule: it hashes the raw file bytes exactly as read, regardless of how a program might interpret those bytes as text.

  • Whitespace matters: leading and trailing spaces are part of the message.
  • Line endings matter: carriage returns and line feeds are ordinary input bytes.
  • A final newline matters: “abc” and “abc” followed by a newline are different messages.
  • Encoding matters: text mode always uses UTF-8, even when the characters appear as plain ASCII.
  • File content matters: changing bytes can change the digest, even if the document still renders identically.

The filename, modification time, and browser MIME label are not included in the digest. Renaming a file therefore does not change its SHA-1 value, while editing its contents can change its SHA-1 value.

For a simple reference fixture, the SHA-1 digest of an empty text message is da39a3ee5e6b4b0d3255bfef95601890afd80709. This result is different from having no output: the Generate button must still be clicked.

Choose the Published Representation

Hex and Base64 are two encodings of the same 20-byte SHA-1 result. Base64 is not a second hashing algorithm, and converting between representations does not run SHA-1 again.

RepresentationExact lengthSelection rule
Hex40 lowercase charactersChoose it when the legacy field or published checksum identifies Hex
Base6428 characters, including paddingChoose it when the legacy field or published checksum identifies standard Base64

Compare all 40 Hex characters or all 28 Base64 characters rather than inspecting only the beginning and end. The guide Get a SHA-1 Hash: Text vs File, Hex vs Base64 expands on these distinctions when an expected value does not match.

Security Boundaries of a Digest Match

A SHA-1 match answers one narrow question: does the selected byte sequence produce the expected 160-bit digest under SHA-1? When the expected digest came through a trusted channel, a match can reveal accidental transfer damage. It does not prove authorship, establish that a file came from a particular source, or guarantee protection against deliberate tampering.

SHA-1’s collision resistance is broken. Attackers can construct different content with the same digest under realistic conditions, as discussed in RFC 6194’s SHA-1 security considerations. Do not select SHA-1 for signatures, certificate decisions, password storage, adversarial file approval, tamper protection, or any new security design.

A plain SHA-1 digest is also not a password hash. Fast general-purpose algorithms allow attackers to test guesses quickly, so password storage requires a salted, deliberately expensive scheme such as Argon2id, scrypt, or bcrypt implemented by the account system. This generator never adds a salt and never derives a key.

Diagnose a Character-by-Character Mismatch

Most mismatches come from a difference between the bytes that were hashed and the bytes used to create the published reference.

  • Wrong input mode: A typed copy of a file is not necessarily the same as the file’s raw bytes.
  • Whitespace or newline drift: Check trailing spaces, blank lines, and the presence or absence of a final newline.
  • Different text encoding: The text workflow uses UTF-8. A reference created from another encoding will not match.
  • Wrong representation: Hex and Base64 encode the same digest differently. The generator emits lowercase Hex, so do not assume a case or padding change is harmless.
  • Different source revision: The file may have changed after the expected checksum was published, even if its name stayed the same.
  • Copying error: Confirm that every expected and generated character is present and that no automatic formatting was applied.

For files larger than 100 MB, use a trusted local operating-system tool and verify which algorithm and byte sequence it receives. The browser workflow requires the selected input to fit into one byte buffer, so it is not a streaming replacement for multi-gigabyte command-line workflows.

Retire SHA-1 from New Workflows

Use SHA-1 only when a legacy format explicitly requires it. If you control the consuming system, migrate the stored reference to SHA-256 or stronger and publish the replacement checksum over an authenticated channel. A historical SHA-1 value can still help check an old archive, but retaining it as the only checksum leaves that archive dependent on a collision-broken algorithm.

If you're weighing options, SHA256 Hash Generator Alternative: Compare Exact Options covers this in detail.