Hash Generator

Generate SHA-256, SHA-384, and SHA-512 text hashes locally using browser cryptography.

  • Free
  • No signup
  • Runs in your browser

Hashing is one-way and is not encryption. General-purpose SHA hashing alone is not a password-storage strategy.

How it works

How to use

Choose SHA-256, SHA-384, or SHA-512 and enter text to hash.

Method

Web Crypto digests the UTF-8 bytes locally; hashing is one-way.

Example

SHA-256 produces a 64-character hexadecimal digest.

The hash belongs to the exact bytes

A hash generator does not hash the idea of a word or sentence. It hashes a byte sequence. SnakTool converts the text you enter to UTF-8 bytes and sends those bytes to the selected SHA-2 digest algorithm.

That is why tiny edits matter. hello, Hello, hello followed by a space, and hello followed by a newline are four different byte sequences and therefore produce different digests. When two hashes do not match, inspect the input before assuming the hashing algorithm is wrong.

SHA-256 of exact text
Input: hello
SHA-256:
2cf24dba5fb0a30e26e83b2ac5b9e29
1b161e5c1fa7425e73043362938b9824

The same bytes reproduce the same fingerprint

SHA-256, SHA-384 and SHA-512 are deterministic: the same byte sequence under the same algorithm produces the same digest every time. There is no random seed or timestamp added by this tool.

That property makes a digest useful as a compact fingerprint for comparison. Hash one text value now and the same exact value later, and matching digests provide strong evidence that the hashed bytes are identical. A checksum comparison is still only as trustworthy as the expected digest you compare against; a digest supplied by an untrusted source does not establish who created the content.

Digest length comes from the algorithm, not the text

A one-character input and a much longer input produce the same output length when they use the same SHA algorithm. The number in each SHA-2 name identifies its digest size in bits, while SnakTool displays those digest bytes as lowercase hexadecimal.

Hexadecimal uses two characters for each byte. A 256-bit digest is 32 bytes and therefore 64 hex characters; SHA-384 produces 48 bytes and 96 hex characters; SHA-512 produces 64 bytes and 128 hex characters.

AlgorithmDigest sizeDigest bytesHex characters
SHA-256256 bits3264
SHA-384384 bits4896
SHA-512512 bits64128

Match the algorithm and output representation

A digest only matches another system when both sides hash the same bytes with the same algorithm. If an API or specification requires SHA-256, substituting SHA-512 does not create a compatible value simply because its digest is longer.

Representation matters too. The underlying digest is a sequence of bytes; hexadecimal is one way to display it. SnakTool returns lowercase hex. Another system may display the same digest bytes as uppercase hex or encode them as Base64, so compare the underlying format requirements before deciding two visible strings represent different calculations.

Whitespace and Unicode can explain a mysterious mismatch

Spaces, tabs and line endings are data. SnakTool does not trim the input before hashing, so a trailing space or newline changes the digest. Command-line comparisons can differ for the same reason when one command appends a line ending and another does not.

Unicode text is converted to UTF-8 before hashing. Visually similar text can sometimes be represented by different Unicode code-point sequences, and this tool does not normalize those sequences before hashing. If another program normalizes text, uses another character encoding or changes line endings, its digest can differ even when the displayed text looks similar.

Visually small changes are different inputs
hello
hello␠
Hello
hello + newline

Each byte sequence has its own digest.

One-way does not mean the original input is unknowable

A cryptographic hash is not encryption: there is no decryption key that turns a SHA digest back into its source text. The function maps inputs into fixed-size digests rather than storing a reversible copy of the original value.

That does not make a predictable input secret. Someone who suspects the source was 123456, password, an email address or another guessable value can hash candidate inputs and compare the results. Hashing therefore should not be treated as automatic anonymization of low-entropy or predictable data.

Raw SHA is not a password-storage scheme

SHA-256, SHA-384 and SHA-512 are fast general-purpose hash functions. That speed is useful for many digest and integrity workflows, but password storage has different requirements because an attacker with stored hashes can try large numbers of password guesses.

Password systems use purpose-built password hashing or key-derivation schemes with salts and configurable work, such as Argon2, scrypt, bcrypt or PBKDF2 where appropriate. SnakTool's Hash Generator produces a raw SHA digest; it does not add a salt or turn SHA into a password-storage workflow.

HMAC-SHA256 is not SHA-256 with a different label

A raw hash takes the message as its input. HMAC combines a secret key with a hash construction so a verifier who knows that key can authenticate the message. An API asking for an HMAC-SHA256 signature is therefore asking for more than SHA-256(message).

This Hash Generator has no secret-key field and does not generate HMAC values. Use an HMAC implementation when a protocol specifies HMAC rather than substituting the raw digest shown here.

Text hashing and file hashing are different inputs

File checksums are a common use of SHA algorithms, but a file hash must be calculated from the file's raw bytes. This page accepts text and hashes its UTF-8 bytes; it does not read uploaded files.

Typing a filename hashes the filename text, not the file. Pasting text extracted from a PDF, image or archive also does not reproduce that file's checksum because the original binary bytes are different from the extracted text.

Frequently asked questions about Hash Generator

Why is the SHA-256 result always the same length?

SHA-256 always produces a 256-bit, or 32-byte, digest. SnakTool displays each byte as two hexadecimal characters, so the visible SHA-256 result is always 64 hex characters.

Can I upload a file to hash it?

No. This page hashes UTF-8 text only. A filename or text extracted from a file is not the same input as the file's raw bytes and will not reproduce its file checksum.

What does a hash generator do?

It converts input bytes into a fixed-size digest using a hash algorithm. SnakTool encodes your text as UTF-8 and can calculate SHA-256, SHA-384 or SHA-512.

What is the difference between SHA-256, SHA-384 and SHA-512?

They produce different digest sizes and are distinct algorithm choices within SHA-2. SHA-256 outputs 256 bits, SHA-384 outputs 384 bits and SHA-512 outputs 512 bits. Use the algorithm required by the system or specification you need to match.

How long is a SHA-512 hash in hexadecimal?

SHA-512 produces 512 bits, or 64 bytes. In hexadecimal that is 128 characters.

Why did changing one character completely change the hash?

Cryptographic hash functions are designed so input changes propagate through the digest. Even a small byte-level change can produce a very different-looking output.

Does a trailing space or newline change a hash?

Yes. SnakTool hashes the exact UTF-8 bytes and does not trim the text first, so spaces, tabs and line endings are part of the input.

Can I reverse a SHA-256 hash?

There is no decryption operation that reconstructs arbitrary source text from a SHA-256 digest. However, predictable inputs can still be guessed by hashing candidates and comparing their digests.

Is hashing the same as encryption?

No. Encryption is designed to be reversible with the appropriate key. A cryptographic hash produces a fixed-size digest and has no decryption key.

Can I use this tool to hash passwords for storage?

Do not use a raw SHA-256, SHA-384 or SHA-512 digest as a password-storage scheme. Password storage should use an appropriate password hashing or key-derivation design with salts and work factors.

Does this tool support HMAC?

No. This page has no secret-key input and calculates raw SHA-256, SHA-384 or SHA-512 digests only.

Is the hash output hexadecimal or Base64?

SnakTool returns lowercase hexadecimal. The digest bytes could be represented differently by other systems, including Base64, so match the representation expected by the system you are comparing against.

What is the maximum input size for the Hash Generator?

The current developer-text limit is 1,048,576 UTF-16 code units. Input above that limit is rejected before hashing.

Browse all Developer Tools