Developer & Web
Online SHA-256 Hash: Text Bytes, Digests and Verification
Generate a SHA-256 text digest, verify known examples, and understand UTF-8, whitespace, normalization and why a hash is neither reversible encoding nor authentication.
Distinguish hashing from reversible encoding
The query SHA-256 encoder usually means a tool that calculates a SHA-256 hash. Hashing is different from reversible notation changes such as Base64 encoding. SHA-256 maps input bytes to a 256-bit digest, conventionally displayed as 64 hexadecimal characters. That digest does not contain a recoverable copy of the original text, and there is no general decode operation that reconstructs it. The local SHA-256 Generator accepts text and displays its digest. It is not an encryption tool, a password recovery service or a converter from an existing hexadecimal digest back to a message.
Establish the bytes before comparing results
The local generator hashes the UTF-8 representation of the supplied text. For ordinary ASCII text abc, the three input bytes have hexadecimal values 61, 62, 63. The resulting SHA-256 digest is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. Enter exactly those three lowercase letters without quotation marks or a trailing line break to reproduce the check. The 64 output characters are a representation of 32 digest bytes. They are not 64 bytes of original input and do not indicate how long the original message was.
Use the empty-message case deliberately
An empty input is a valid message for SHA-256. Its digest is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. This is different from a message containing one space, a newline or the visible word empty. The local generator accepts the empty string rather than reporting it as an invalid required value. When testing another implementation, specify whether the intended case contains zero bytes or an invisible whitespace character. Otherwise two correct implementations can appear to disagree because they were given different messages.
Preserve case, spaces and line endings
The strings abc, ABC and abc followed by a newline are distinct byte sequences and produce distinct digests. Pasting content from an editor can introduce a final line break that is easy to miss. A text area also participates in browser text handling, so copying a file's visible contents into it is not a guarantee of preserving the file's original byte encoding or line-ending convention. For a file checksum, hash the file's actual bytes using an appropriate file-aware workflow. This particular local tool is a text generator, not a file-upload checksum calculator.
Recognize visually similar Unicode inputs
A displayed accented character can have different Unicode representations. The single character é, U+00E9, encodes in UTF-8 as bytes C3 A9. The sequence e followed by combining acute accent, U+0065 U+0301, encodes as 65 CC 81. These sequences can look the same but have different bytes and therefore different digests. The local generator does not silently normalize the text into one chosen Unicode form before hashing. If an application defines a normalization rule, apply that same documented rule on both sides of a comparison rather than changing one input until the hashes happen to agree.
Separate integrity checking from trusted identity
Matching a computed digest with a trusted expected digest is useful for detecting a change in the supplied bytes. A hash alone does not establish who published the message: someone able to replace both a file and its accompanying digest can make them agree. Authentication requires a suitable trusted mechanism, such as a verified digital signature or an appropriately used keyed construction. Likewise, a bare fast SHA-256 digest is not a complete password-storage design. OWASP's password-storage guidance calls for purpose-built password hashing with the required salt and work settings rather than treating this general text tool as an account-security system.
Make a reproducible verification record
Record the algorithm as SHA-256, the input's encoding and any intentional preprocessing, and the full expected digest. For the abc test, confirm the 64-character value rather than comparing only a short prefix. An independent browser check can encode the same text with TextEncoder and pass its bytes to the Web Crypto digest operation using SHA-256; the local generator's own implementation does not need to use that API to produce the same result. Keep the source text unchanged between checks. A mismatch is a reason to inspect the bytes, algorithm and preprocessing before assuming the hash function itself is broken.
Use the SHA-256 Generator
Source and scope
NIST: Secure Hash Standard FIPS 180-4
WHATWG Encoding Standard: TextEncoder and UTF-8