LocalExcelTool
Get started

SHA-256 Hash

Compute a cryptographically secure SHA-256 hash of any text.

Runs in your browserNo account neededFree

What is SHA-256 Hash

SHA-256 is a cryptographic hash function producing a 256-bit (64 hex character) hash, widely used in blockchain and signatures.

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

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.

How to use it

  1. 1.Enter text
  2. 2.Compute hash
  3. 3.Copy result

How SHA-256 Hash works under the hood

Encoding tools convert between representations of the same bytes: Base64, percent-encoding, hex, HTML entities, Unicode escapes. A correct encoder is reversible; a lossy one silently changes the data.

  1. 1

    Get the exact bytes

    Text is encoded to UTF-8 bytes with TextEncoder first; binary input is read as an ArrayBuffer. Encoding the wrong byte sequence is the most common cause of a wrong result.

  2. 2

    Apply the encoding rule

    Each format has an exact specification: Base64 uses a 64-symbol alphabet with padding, percent-encoding escapes reserved characters as UTF-8 bytes.

  3. 3

    Decode back to verify

    Round-tripping the output back to the input is the only honest proof that an encoder is correct. The tool keeps the reverse path available on the same page.

  4. Processing pipeline

Base64 is not encryption

Base64 increases size by about a third and hides nothing: anyone can decode it. It exists to carry binary data through text-only channels such as JSON, email headers and data URLs. If you need confidentiality, use encryption with a key, not an encoding.

Where encoders break

Percent-encoding applied twice turns %20 into %2520; Base64 without padding fails strict decoders; UTF-16 input decoded as UTF-8 produces replacement characters that cannot be recovered. When output looks wrong, check the byte sequence before checking the tool.

Verify it yourself

Encoders are pure functions over bytes. Decode the output again and you should get the input back exactly.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

What is SHA-256?

A cryptographically secure function that converts data into a fixed-length hash.

Difference from MD5?

SHA-256 is collision-resistant and suitable for security uses.

Is it safe?

It uses the browser's native crypto API, computed locally.

What this kind of conversion cannot keep

Encoding and hashing run through the browser's Web Crypto API or a pure-JavaScript implementation. The output is deterministic: the same input always produces the same digest, so you can verify a result against any other tool.

More in Encoding