Skip to content
DevToolPilot

Generators & Time

Hash Generator

Calculate SHA-256 and SHA-512 digests for text or a file with the Web Crypto API. This computes a hash, not an encryption.

Processed locally. Nothing from the editor is stored.

How to use Hash Generator

Digests are computed with crypto.subtle.digest. The same input and algorithm always produce the same hex string. A hash cannot be reversed into the original text by this tool.

  1. Choose SHA-256 or SHA-512.
  2. Type text or drop a file up to 8 MB.
  3. Copy the hex digest. Hashing a file uses the bytes, not a text conversion.

Examples

Check a known vector

The SHA-256 digest of abc is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad.

Compare a download

Hash the file you downloaded and compare the hex with the publisher's checksum. A match means the bytes match, not that the publisher is trustworthy.

Questions

Is a hash the same as encryption?

No. Encryption is reversible with a key. SHA-256 and SHA-512 are one-way digests. Do not use them as a way to store a password by themselves.

Why does an empty file have a hash?

The empty input is valid data. SHA-256 of an empty input is a well-known 64-character hex string.

Related tools