LocalExcelTool
はじめる

SHA-256 ハッシュ

文字列のSHA-256ハッシュを計算。暗号学的に安全なハッシュ関数。

SHA-256 ハッシュとは

SHA-256とは、データを256ビット(64文字の16進数)のハッシュ値に変換する暗号学的ハッシュ関数です。ブロックチェーンや署名で広く使われます。

🔒 処理はすべてブラウザ内で完結し、データは送信されません。

このツールの前提

処理場所
このページのブラウザ内(JavaScript / Canvas)
アップロード
なし — ファイルは端末の外に出ません
オフライン
ページを開いた後は通信不要

Computed by the browser's own crypto engine

This uses crypto.subtle.digest, the native Web Crypto implementation, rather than a JavaScript reimplementation. The call is asynchronous because the digest is computed off the main thread, and the output is 64 hex characters — twice the length of MD5 for the same input.

Web Crypto is only available in a secure context. On an http:// page, crypto.subtle is undefined and any hashing call fails, which is why this tool must be served over HTTPS or from localhost. That is a browser rule, not a limitation of the page.

What changes the digest

The string is encoded as UTF-8 before hashing, so the same visible text produces the same digest across platforms — but only if the bytes match. A trailing space, a newline at the end of a pasted block, or a smart quote substituted by a word processor all produce a completely different result. When comparing against a checksum from a vendor, compare lengths and look for invisible trailing characters first.

Empty input has a well-known digest (e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855). If you get that value for text you can see on screen, the tool received nothing — usually because the input was placed in a different field.

SHA-256 versus the rest of the family

SHA-256 is the default choice for integrity and for signatures. SHA-1 is broken for collision resistance and should only appear where an old protocol demands it; SHA-512 is the same design with a larger internal state and is marginally faster on 64-bit hardware, which is why some systems prefer it.

None of them are password hashes. A plain digest of a password is still a fast, unsalted function; the correct construction is a slow KDF. And a hash alone proves nothing about origin — for that you need an HMAC with a secret key, or a signature with a private key.

使い方

  1. 1.文字列を入力
  2. 2.ハッシュを計算
  3. 3.コピー

他の方法との比較

同じ変換をする方法は 3 つあります。ブラウザ内(このページ)、サーバー側の変換サービス、デスクトップアプリ。差がつくのは速度ではなく、ファイルがどこへ行くかと、無料でどこまでできるかです。

観点このツールサーバー側の変換サービス
ファイルの処理場所このページのブラウザ内ベンダーのサーバー(アップロード後)
アカウント不要多くの場合必要(無料枠の制限解除に登録を求める)
無料で扱えるサイズサイズ制限なし(回数制限もなし)数ファイル/時間、または 5〜10MB 程度で課金 wall
料金無料。Pro は月 $9(大きいファイルと AI 機能のみ)サブスクが一般的。おおむね月 $7〜15(2026 年 11 月時点)
オフライン一度開けば通信不要不可
20MB を処理し始めるまで待ち時間なし(アップロードが無い)アップロードが支配的(10Mbps 上りで約 16 秒)
保証できないこと出力は決定的です。他の実装と突き合わせて検証できます同じ(変換の原理は変わらない)

サーバー側のサービスが優れている点は明確にあります。巨大なファイル、チームでの共有、変換履歴の管理、スクリプトからの自動化。逆に「1 回だけ、手元のファイルを別形式にしたい」という今回の用途では、アップロードの待ち時間と登録の手間だけが増えます。

よくある質問

SHA-256とは?

データを固定長のハッシュに変換する暗号学的に安全な関数です。

MD5との違いは?

SHA-256は衝突耐性が高く、セキュリティ用途に適しています。

安全ですか?

ブラウザの標準暗号APIでローカル計算します。

この変換で失われるもの

エンコードとハッシュは Web Crypto API または純 JavaScript 実装で行います。出力は決定的で、同じ入力からは常に同じ結果になります。他のツールと突き合わせて検証できます。

その他のエンコード / デコード