Skip to content
YAS.SH
Security🔒 Browser (client-side)API available📴 Works offlinebeginner

Hash Calculator

Computes a cryptographic hash (MD5, SHA-1, SHA-256, SHA-384, SHA-512) of your text in the browser.

Data stays in your browser
Ready to runInstant execution
All tools →
Result

What does this tool do?

Computes a cryptographic hash (MD5, SHA-1, SHA-256, SHA-384, SHA-512) of your text in the browser.

Why would I use it?

  • You are verifying a file or message checksum.
  • You want a deterministic fingerprint of a string.
  • You are comparing whether two values are identical without storing them.

Real-life example

Input
hello
Output
sha256: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

The same input always produces the same hash.

Input → Process → Output → Next

Input
Type text, pick an algorithm.
Process
The browser computes the digest with the Web Crypto API.
Output
The hex digest.
Next action
Compare it against the expected checksum.

Common mistakes

  • Using MD5 or SHA-1 for security — they are broken for collisions.
  • Using a hash to store passwords — use bcrypt/argon2 instead.
  • Confusing hashing with encryption (hashing is one-way).

What the result means

Equal hashes mean equal inputs (with overwhelming probability for SHA-2).

Privacy & security

Your input is processed entirely in your browser and never sent to a YAS server.

API

Endpoint
POST https://yas.sh/api/v1/tools/hash-calculator
Request Header
Content-Type: application/json
cURL
curl -X POST "https://yas.sh/api/v1/tools/hash-calculator" \
  -H "Content-Type: application/json" \
  -d '{"input":"hello","algo":"md5"}'
JavaScript
const res = await fetch("https://yas.sh/api/v1/tools/hash-calculator", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "input": "hello",
  "algo": "md5"
}),
});
const data = await res.json();
Python
import requests

r = requests.post("https://yas.sh/api/v1/tools/hash-calculator", json={"input":"hello","algo":"md5"})
data = r.json()
FieldTypeRequiredDescription
inputstringYesText to hash (≤ 64 KB)
algostringNo (default "sha256")One of md5, sha1, sha256, sha384, sha512
Success response
{ "slug": "hash-calculator", "algo": "md5", "result": "5d41402abc4b2a76b9719d911017c592" }

Cryptographic digest of a string.

Error responses
  • 400 VALIDATION_ERROR — invalid input or unsupported option.
  • 413 PAYLOAD_TOO_LARGE — input exceeds the 64 KB limit.
  • 429 RATE_LIMIT_EXCEEDED — rate limit exceeded (60 req/min).
Limits
  • Maximum input: 64 KB per request.
  • Rate limit: 60 requests/min per IP address.
  • Authenticated accounts benefit from higher tier quotas.

Hash Calculator: technical reference, use cases and FAQ

How Hash Calculator works

A cryptographic hash compresses input of any length into a fixed-size digest by iterating a compression function over padded message blocks. SHA-256 processes 512-bit blocks into a 256-bit state; SHA-512 uses 1024-bit blocks and 64-bit words. The result is deterministic — the same bytes always produce the same digest — and avalanche behaviour means a single flipped bit changes roughly half the output bits.

The property that makes hashes useful is one-wayness: computing the digest is cheap, recovering the input is not. There is no 'decrypt' operation. What an attacker can do is guess — hash candidate inputs until one matches — which is why hashing a password with SHA-256 is unsafe: a modern GPU computes billions of SHA-256 digests per second.

MD5 and SHA-1 remain in the tool because they are still required to verify legacy artefacts, but both are broken for security purposes. MD5 collisions are trivially constructible, and SHA-1 fell to the SHAttered attack in 2017. Use SHA-256 or better for anything where an adversary benefits from forging a match.

When to use it: real-world scenarios

Verifying a downloaded release against its published checksum

Hash the file's contents and compare with the SHA-256 the vendor published over a different channel. A match proves integrity, not authenticity — if the attacker controls both the file and the page listing the checksum, the comparison proves nothing. Prefer a signed checksum file where one exists.

Deduplicating records without storing the original value

Hashing a normalised email address gives a stable key you can compare across systems without keeping the address itself. Add a secret salt with the HMAC tool if the value space is small enough to brute-force, which it is for emails and phone numbers.

Building a cache key or ETag

A digest of the serialized inputs gives a fixed-length, collision-resistant identifier for a computed result. SHA-256 truncated to 16 hex characters is common practice and keeps keys short enough for headers.

Confirming two files are identical across machines

Comparing digests avoids transferring the file. Equal digests from a modern algorithm mean the bytes are equal for every practical purpose; differing digests localise the problem to transfer or encoding, often a CRLF conversion.

Pro tips

  • Hash bytes, not the display form. Trailing newlines, BOMs and CRLF line endings change the digest, which explains most 'the checksum does not match' reports on Windows.
  • Never store passwords as a plain hash, even SHA-512. Use bcrypt, scrypt or Argon2 — the Bcrypt tool applies a tunable work factor precisely to make guessing slow.
  • Compare digests with a constant-time comparison in production code. String equality can leak timing information when the value being compared is secret.
  • Truncating a SHA-256 digest is acceptable for cache keys but reduces collision resistance: 64 bits of output means a collision becomes likely after roughly 2^32 items.

Limitations and edge cases

What this tool deliberately does not do, and where it will disagree with other implementations.

  • Hashes cannot be reversed by this or any tool. Sites claiming to 'decrypt MD5' are querying precomputed dictionaries of common inputs.
  • MD5 and SHA-1 must not be used where collision resistance matters; they are offered only for compatibility with existing systems.
  • The tool hashes UTF-8 text. Hashing a file requires the Checksum tool, which reads raw bytes without a text-decoding step.
  • Unsalted hashes of low-entropy inputs (passwords, PINs, phone numbers) are recoverable from rainbow tables regardless of algorithm strength.

Frequently asked questions

Can I decrypt or reverse a hash?
No. Hashing is one-way by construction. Services that appear to reverse MD5 are looking the digest up in a table of previously hashed common strings, which only works for inputs someone already hashed.
Which algorithm should I use in 2026?
SHA-256 for general integrity, SHA-512 when you want a larger margin, and a purpose-built password hash (Argon2id, bcrypt, scrypt) for credentials. Avoid MD5 and SHA-1 for anything security-relevant.
Why do two files with the same content give different hashes?
The bytes differ somewhere you cannot see: a trailing newline, a byte-order mark, CRLF versus LF line endings, or a different text encoding. Compare file sizes first — a one- or three-byte difference points straight at a BOM or newline.
Is my input sent anywhere?
No. Digests are computed in the browser with the Web Crypto API. The equivalent API endpoint exists for automation and does receive the input, so do not send secrets to it.
Ask YAS AI
🍪 Cookies & privacy. Essential cookies keep you signed in and remember language and theme. Google AdSense and reCAPTCHA are Google technologies: AdSense runs only after Accept All; reCAPTCHA loads on sign-in and contact forms. See how Google uses data: https://policies.google.com/technologies/partner-sites cookie policy · privacy policy.
Settings