First CHToolsFree web tools

FIRST CH TOOLS / Dev / 23 HASH GENERATOR

MD5 / SHA-256 / SHA-512 Hash Generator

Hashes text or a file with MD5, SHA-1, SHA-256, SHA-384 and SHA-512 at once and verifies a published checksum. Everything is computed in your browser; the text you type and the files you drop are never sent anywhere.

Supported formats and details

Output as hex (lower or upper case), Base64 or base64url. The verification box takes sha256sum output or a prefixed value such as sha256:… as-is and infers the algorithm from the length. When a value does not match, “Find the cause” checks whether it matches with different line endings (LF/CRLF), a BOM, a trailing newline or surrounding spaces. The SHA family uses the browser's Web Crypto API; MD5 uses this page's JavaScript implementation (RFC 1321).

Type and all five digests appear at once

Text

Digests
Settings: hex (lower) · LF · no BOM
Value to verify (optional)

Upper or lower case, a sha256:… prefix, the <digest>␣␣<filename> form printed by sha256sum, colon-separated hex and Base64 are all accepted as they are.

Notes

    NEXT STEP

    Share a one-character hash comparison as an image

    One image showing how changing a single character changes most of the digest. It starts with a public sample. Only the A and B fields below go on the card — the text box and verification box above are never used.

    How to Use

    1. Enter somethingType into the text box, or drop a file onto the File tab. All five digests appear right below as you type, and the line under the box says “Updated 5 digests”.
    2. Copy or verifyUse the copy button on each row. Paste a published checksum into the verification box and the verdict appears at the top of the results — “Matches SHA-256” or “Does not match”.
    3. If it does not match, find the causePress “Find the cause” to recompute with every combination of line endings, BOM, trailing newline and surrounding spaces, and see which one matches. Your text and settings are left unchanged; switch format or line endings under “Settings”.

    About This Tool

    A hash function turns data of any length into a fixed-length value in one direction only. The same input always produces the same digest, a single changed byte produces a completely different one, and the original data cannot be recovered from the digest. That is what makes hashes useful for confirming a download is intact, detecting that something changed, and signing API requests.

    Example (this page's sample): “Total due: $100.00” and “Total due: $100.01” differ only in the last character, yet SHA-256 differs in 62 of 64 hex digits, SHA-1 in 36 of 40 and MD5 in all 32 of 32 (UTF-8, no newline, as calculated by this tool; the comparison card uses this pair). “Try a mismatch” uses a two-line CSV ending with a newline: its SHA-256 with LF is 1f04851b…, while the same text with CRLF gives 344b2ce9…, so the characters match but the digests do not. “Find the cause” computes 8 combinations including this one and reports the match with CRLF and no BOM.

    When MD5 and SHA-1 are acceptable — and when they are not

    MD5 and SHA-1 are broken for collision resistance. Attacks that produce two different inputs with the same digest have been demonstrated; RFC 6151 states that MD5 is no longer acceptable where collision resistance is required, such as digital signatures. For SHA-1, CWI Amsterdam and Google announced the first real collision (SHAttered) in February 2017, and on 15 December 2022 NIST recommended phasing SHA-1 out by 31 December 2030 in favour of SHA-2 or SHA-3. Both still catch accidental corruption in transit, but do not use them for signatures, certificates or tamper detection — for anything new, use SHA-256.

    Why a plain hash is not password storage

    The OWASP Password Storage Cheat Sheet says fast hashes such as SHA-256 are not suitable for password storage because they let attackers try large numbers of guesses quickly. Passwords need a per-user salt and a deliberately slow algorithm (the cheat sheet lists Argon2id, scrypt, bcrypt and PBKDF2). Treat this tool as being for integrity checks and signature preparation.

    When the same text gives a different digest

    The cause is almost always the line endings or a BOM. Windows text files end lines with CRLF (0D 0A), macOS and Linux with LF (0A), and to a hash function those are simply different data — as is a trailing newline at the end of the file (echo adds one). When verification fails, “Find the cause” tries these combinations for you. The character encoding is always UTF-8 (to hash Shift_JIS bytes, convert the file with the encoding converter first and drop the result onto the File tab).

    Accepted checksum formats, how it is computed, URL parameters

    The verification box accepts the <digest>␣␣file.zip form from sha256sum, the output of shasum -a 256, the SHA256 (file) = … form, a sha256:… prefix, colon-separated hex, and Base64 (such as the part after sha384- in a Subresource Integrity attribute). The algorithm is inferred from the length.

    The SHA family is computed with the browser's Web Crypto API (crypto.subtle.digest, which supports SHA-1, SHA-256, SHA-384 and SHA-512 and only works in secure contexts such as https). MD5 is not part of Web Crypto, so it is computed by the RFC 1321 implementation shipped with this page.

    Callable via URL parameters: /en/hash/?text=hello / /en/hash/?text=hello&fmt=base64 / /en/hash/?text=hello&expect=5d41402abc4b2a76b9719d911017c592. A value in the URL reaches the server as part of the page request, so paste secrets into the boxes on the page instead.

    Sources (checked 2026-11-08)

    From AI Agents

    The same hashing logic is available as the hash_generate tool of the MCP (Model Context Protocol) server @first-ch/tools-mcp, so an AI agent can call it directly without a browser. See Using these tools from AI agents for details.

    Install and examples
    claude mcp add firstch-tools -- npx -y @first-ch/tools-mcp
    # Hash a string (MD5 / SHA-1 / SHA-256 / SHA-512 by default)
    hash_generate(text="hello")
    
    # SHA-256 only, as Base64
    hash_generate(text="hello", algorithms=["sha256"], format="base64")
    
    # Verify a downloaded file against its published checksum
    hash_generate(path="/tmp/app.dmg", expected="9f86d081884c7d65...")
    
    # Reproduce a Windows text file (CRLF + BOM)
    hash_generate(text="a\nb", newline="crlf", bom=true)

    Other Tools

    See all tools