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
Settings: hex (lower) · LF · no BOM
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.
Check a downloaded file against its published checksum
The file is only read locally — nothing is uploaded. Files of a few hundred MB work fine, though an older machine may take a moment.
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
- 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”.
- 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”.
- 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)
- MD5 is not acceptable where collision resistance is required, such as digital signatures: RFC 6151 “Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms” (March 2011) rfc-editor.org/rfc/rfc6151.html
- First real SHA-1 collision (23 February 2017, CWI Amsterdam and Google): SHAttered shattered.io
- Phase out SHA-1 by 31 December 2030 and migrate to SHA-2 or SHA-3 (announced 15 December 2022): NIST “NIST Retires SHA-1 Cryptographic Algorithm” nist.gov/news-events/news/2022/12/nist-retires-sha-1-cryptographic-algorithm
- Fast hashes are unsuitable for passwords; recommended algorithms: OWASP “Password Storage Cheat Sheet” cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html
- Algorithms supported by Web Crypto digest (no MD5) and the secure-context requirement: MDN “SubtleCrypto: digest() method” developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
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
- 01Batch Image → WebPWebP Converter
- 02White Background RemoverWhite BG Remover
- 03WCAG Contrast CheckerContrast Checker
- 04Character CounterCharacter Counter
- 05llms.txt Generatorllms.txt Generator
- 06JSON-LD GeneratorJSON-LD Generator
- 07Markdown → PDFMD → PDF
- 08OGP Meta Tag WizardOGP Wizard
- 09Favicon GeneratorFavicon Generator
- 10TikTok PublisherTikTok Publisher
- 11Encoding & Line Ending ConverterEncoding Converter
- 12Batch Image → AVIF + pictureAVIF Converter
- 13Test Data GeneratorTest Data Generator
- 14Marp Markdown → SlidesMarp Slides
- 15Text & Code Diff CheckerDiff Checker
- 16Cron Explainer & Next RunsCron Explainer
- 17Base64 & Data URI EncoderBase64 & Data URI
- 18URL Parameter Editor & UTM BuilderURL Parameters
- 19HTML Entity Escape & UnescapeHTML Escape
- 20JSON ⇄ YAML ConverterJSON ⇄ YAML
- 21PX ⇄ REM / EM ConverterPX ⇄ REM / EM 単位変換
- 22Color Converter & Alphaカラーコード変換&アルファ透過
- 24JWT Decoder & Expiry CheckerJWTデコーダー&有効期限チェッカー
- 25User-Agent ParserUser-Agent解析&デバイス判定
- 26UUID & ULID GeneratorUUID (v4) & ULID 一括生成
- 27Aspect Ratio Calculatorアスペクト比計算&サイズ算出
- 28Markdown Table & CSV/TSV ConverterMarkdownテーブル整形&CSV/TSV変換
- 29SQL Query FormatterSQLクエリ整形(フォーマッター)
- 30QR Code GeneratorQR Code Generator
- 31Regex Tester正規表現テスター
- 32Unix Timestamp ConverterUNIXタイムスタンプ⇄日時変換
- 33New Tab Memo新規タブメモ帳
- 34Image Resizer & Cropper画像リサイズ&クロップ
- 35EXIF Viewer & RemoverEXIF情報の確認&除去
- 36robots.txt Generatorrobots.txt ジェネレーター
- 37Password Generator安全なパスワード生成
- 38Case Converter文字列ケース変換
- 39CSV/TSV ⇄ JSON ConverterCSV/TSV ⇄ JSON 相互変換
- 40PDF Merge, Split & ExtractPDF結合・分割・ページ抽出
- 41Full-width ⇄ Half-width Converter全角⇄半角変換&テキストクリーナー
- 42X (Twitter) Post CounterX(Twitter)投稿の文字数計算(重み付き)
- 43CSS clamp() Fluid Typography CalculatorCSS clamp() 計算機
- 44CSS Gradient GeneratorCSSグラデーションジェネレーター
- 45Image Colour Palette Extractor画像からカラーパレット抽出
- 46QR Code ReaderQRコード読み取り
- 47SVG Optimizer & Data URISVG最適化&data URI化
- 48Redirect Generatorリダイレクトルール ジェネレーター
- 49IP / CIDR CalculatorIPアドレス・CIDR計算機
- 50ICS Calendar Event GeneratorICS Generator
- 51cubic-bezier Easing Preview & ComparisonEasing Preview
- 52CSS box-shadow Generatorbox-shadow ジェネレーター
- 53Japanese Dummy Text Generator和文ダミーテキスト生成
- 54Social Media Image ResizerSNS画像サイズ一括書き出し
- 55Time Zone Converter & World Clockタイムゾーン変換・世界時計
- 56Date & Business Day Calculator日数・営業日計算
- 57HTML → MarkdownHTML→Markdown変換
- 58HEIC to JPEG/PNG ConverterHEIC Converter
- 59Print Size & DPI Calculator印刷サイズ・DPI計算機
- 60Color Blindness SimulatorColor Blindness Simulator
- 61SERP Preview & Meta Tag Length CheckerSERPプレビュー&メタタグ文字数チェック
- 62Flexbox & CSS Grid GeneratorFlexbox / CSS Grid ジェネレーター
- 63Text Line Toolsテキスト行操作ツール
- 64Screenshot Frame & Background Makerスクリーンショット枠装飾
- 65Japanese Era ⇄ Western Calendar Converter和暦 ⇄ 西暦変換
- 66URL Slug Generator (Japanese → Romaji)URLスラッグ生成(日本語→ローマ字)
- 67htpasswd Generatorhtpasswd ジェネレーター
- 68OGP Image GeneratorOGP画像ジェネレーター
- 69Stamp Shape Generatorスタンプ形ジェネレーター
- 70Stay Awakeスリープ防止
- 71Screen Recorder with Click Auto-Zoom画面録画+クリック自動ズーム
- 723D Device Mockup Generator3Dデバイスモックアップジェネレーター
- 73OpenAPI Docs & TS Types GeneratorOpenAPI→日本語ドキュメント&TS型定義
- 74Screen Review Board画面レビューボード
- 75AI Decision JournalAI活用案件の判断記録
- 76Card Binder Plannerカードバインダー配置プランナー
- 77e-Stat CSV to Charte-Stat CSV かんたんグラフ化
- 78FAQ Schema (JSON-LD) & Markdown GeneratorFAQ構造化データ(JSON-LD)&Markdown ジェネレーター
- 79Code to Imageコード画像化
- 80Wiki Duplicate, Orphan & Term Checker社内文書の重複・孤立・表記ゆれチェッカー
- 81Site Style to AI Brand Guideサイトのスタイル→AI向けブランドガイド
- 82Profile Icon Preview: Old vs Newアイコンの丸切り抜きプレビュー
- 83Silent Sleep Camera寝顔を撮る無音カメラ
- 84Instagram PublisherInstagram投稿ツール
- 8512 Months in Photos今年の12枚
- 86Inner Envelope Box Fitterご祝儀袋・香典袋の中袋用 記入下書き