SHA-256 Generator

Generate a 256-bit SHA-256 digest — 64 hexadecimal characters. The default choice almost everywhere integrity matters, and the right answer unless something specifically requires otherwise.

{{ textCount }}

Encoding The same text in a different encoding is different bytes, so it produces a different digest. UTF-8 unless you are matching a legacy system.
Format
Or just start typing…
{{ r.label }} {{ r.bits }} bits · {{ format }} {{ r.secLabel }}

{{ r.value }}

{{ legacyNames }} {{ legacyNames.indexOf(' and ') === -1 ? 'is' : 'are' }} selected. Practical collisions are public for both, so treat the result as a checksum for spotting accidental corruption — not as evidence that a file is authentic.

Export

Drop files here to hash them

or

Up to 100 files · any size · read in 4 MB chunks, never uploaded

Files are read, not uploaded. Each one is streamed through the hash function in chunks straight from disk, so a multi-gigabyte image never lands in memory and never leaves your device.

Encoding The same text in a different encoding is different bytes, so it produces a different digest. UTF-8 unless you are matching a legacy system.
Format
{{ status }}
{{ f.name }} {{ fmtBytes(f.size) }} Done Hashing {{ f.progress }}% Queued Failed

{{ f.error }}

{{ r.label }} {{ r.bits }} bits

{{ r.value }}

Export

The key never leaves this page. It is not sent to a server, not saved to local storage, and not written into the exported files.

Algorithm
Key as Signing secrets from webhook providers are usually published as hex or Base64. Hashing those characters as literal text produces a different, wrong MAC.
Encoding The same text in a different encoding is different bytes, so it produces a different digest. UTF-8 unless you are matching a legacy system.
Format
HMAC-{{ label(hmacAlgo) }} {{ format }}

{{ hmacResult }}

HMAC is not a hash with the key glued on the front. It runs the key through the hash twice with two different pads, which is what makes it resistant to the length-extension attacks that break a naïve hash(key + message).

Drop the file you want to check

or

Hashed in your browser · never uploaded

{{ vFile.name }} {{ fmtBytes(vFile.size) }}
Algorithm A {{ expectedLen }}-character hash could be either of these — pick the one the publisher used. Identified from the hash length.

Hash matches

The {{ vResult.label }} digest of {{ vFile.name }} is identical to the hash you supplied, so this is the file that checksum describes. Letter case and surrounding whitespace were ignored.

Both {{ vResult.computed }}

Hashes match

Both are the same {{ cmpResult.len }}-character value, so they identify identical content. Ignored while comparing: letter case, spaces, line breaks, and any sha256:-style prefix.

Both {{ cmpResult.a }}

Length {{ cmpResult.len }} — consistent with {{ cmpResult.guess }}.

Text, files and secret keys are hashed in your browser. Nothing you enter is ever uploaded to a server.

What SHA-256 is used for

SHA-256 produces 256 bits, written as 64 hexadecimal characters. It is the default nearly everywhere integrity matters: TLS certificate signatures, Linux package and ISO checksums, container image digests, and Bitcoin's proof of work. Git is migrating to it from SHA-1.

Every input length gives the same output length

One character or a four-gigabyte image both produce exactly 64 hex characters. A digest is a fixed-size fingerprint rather than a compressed copy, which is also why hashing cannot be undone: the output is far too small to hold the input.

One changed bit changes about half the output

Hashing Hello World and Hello world gives two values with nothing visible in common. That avalanche behaviour is deliberate, and it is what makes a digest useful for detecting tampering — there is no such thing as a nearly-correct hash.

SHA-256 or SHA-512?

Both are secure. SHA-512 uses 64-bit words and is often faster on 64-bit hardware despite the longer output; SHA-256 is more widely expected by other tools, which makes it the safer default when something else has to read your digest.

Not for passwords

SHA-256 is built to be fast, which is the opposite of what password storage needs. Use Argon2id, bcrypt, scrypt or PBKDF2 — deliberately slow, and salted per user.

See also the full Hash Generator.

What does SHA-256 produce?

256 bits, written as 64 hexadecimal characters, for any input length.

Where is SHA-256 used?

TLS certificate signatures, Linux package and ISO checksums, container image digests, Bitcoin proof of work, and Git as it migrates away from SHA-1. It is the current default for integrity.

Is SHA-256 broken?

No. There is no known practical collision or preimage attack. It is expected to stay adequate for a long time, which is why standards bodies still recommend it.

SHA-256 or SHA-512?

Both are secure. SHA-512 works on 64-bit words and is often faster on 64-bit hardware despite the longer output. SHA-256 is more widely expected by other tools, so it is the safer default for interoperability.

Can I use SHA-256 for passwords?

No. It is fast by design, and fast is what makes brute-forcing stolen hashes viable. Use Argon2id, bcrypt, scrypt or PBKDF2, which are slow on purpose and salted per user.