Hash Generator Guide — How It Works, Tips & Benefits
Free Hash Generator online — generate md5, sha-1, sha-256 hash from text. Step-by-step guide with tips. 100% free, works on mobile. 2026 updated.

Try this tool now — 100% free, no signup required
Open ToolPicture this: you've just wired up Razorpay as the payment gateway for your D2C skincare brand on Shopify. The first few orders flow through fine, but then your ops lead flags a strange webhook — an "order.paid" event that doesn't match any order in your admin panel. Is it a replay attack? A spoofed POST from someone sniffing around your API? The only honest answer lives inside one line of code: comparing the HMAC-SHA256 signature Razorpay sent in the X-Razorpay-Signature header against a hash you compute locally using your webhook secret. If they match, the payload is genuine. If they don't, you drop it. That single check — a hash comparison — is what stands between your reconciliation sheet and a fraud incident.
Hashing shows up in dozens of places Indian developers touch every day: PayU's request hash, the SHA-256 checksum next to an Ubuntu ISO on a mirror hosted at IIT Madras, the MD5 fingerprint Infosys security audits sometimes still ask for, the way Aadhaar reference IDs are derived, the integrity hash on a webpack bundle. The Hash Generator on SabTools.in gives you a browser-based way to compute MD5, SHA-1, and SHA-256 from any text input — no npm install, no Python REPL, no uploading sensitive strings to a sketchy foreign site. This guide walks through what each algorithm actually does, where you'd use it in Indian product work, and the common mistakes that trip up even experienced devs.
What a hash is (and what it absolutely isn't)
A hash function takes an input of any length — three characters or three gigabytes — and produces a fixed-length string called a digest. Feed it the word "Razorpay" and SHA-256 returns a 64-character hex string. Feed it "razorpay" (lowercase r) and you get a completely different 64-character string. Change a single rupee in a ₹1,24,500 transaction payload and the hash changes entirely. That property, called the avalanche effect, is why hashing is the backbone of payment signature verification.
Two things a hash is not, and this trips up juniors constantly:
- Hashing is not encryption. There is no key, no "decrypt" function. If you hash the string "Mumbai" with SHA-256, you cannot run anything on that digest to recover "Mumbai". It's a one-way street. If someone asks you to "decrypt this MD5", they're confused — what they actually want is a rainbow table lookup, which only works for short, common inputs.
- Hashing is not a safe way to store passwords by itself. Plain SHA-256 of a user's password is barely better than storing it plaintext. For password storage you want bcrypt, scrypt, or Argon2 with a salt. SHA-256 is for integrity, not secrecy.
With that out of the way, let's talk about the three algorithms this tool supports and when each one is the right pick.
MD5, SHA-1, SHA-256 — picking the right one
MD5 produces a 128-bit (32-character hex) digest. It's fast, it's old, and it's cryptographically broken — researchers have been generating collisions (two different inputs that produce the same hash) since 2004. Never use MD5 for anything security-sensitive: not signatures, not password hashing, not authentication tokens. Where it's still fine: non-security file deduplication, cache keys, ETag-style change detection. If your Jenkins pipeline computes an MD5 of a built APK just to know whether to redeploy, that's reasonable. If it's checking the APK hasn't been tampered with, switch to SHA-256.
SHA-1 gives you a 160-bit (40-character hex) digest. Also broken — Google published a practical SHA-1 collision in 2017 ("SHAttered"). Git still uses SHA-1 internally for commit IDs, which is why you'll see it everywhere, but new systems should not adopt it. The main reason to compute SHA-1 today is to match some legacy system — an old TCS internal tool, a vendor API from 2014, or a government portal that hasn't updated its spec.
SHA-256 produces a 256-bit (64-character hex) digest and is the current workhorse. It's what Razorpay uses for webhook signatures, what PayU recommends for its modern integrations, what Linux distro mirrors publish next to download links, and what certificate authorities use. Unless you have a specific reason to pick something else, SHA-256 is the default answer. It's secure against currently known attacks and fast enough that computing it on a 10 MB JSON payload takes milliseconds.
A quick visual: paste the single word "test" into the hash generator and you'll see:
- MD5:
098f6bcd4621d373cade4e832627b4f6(32 chars) - SHA-1:
a94a8fef8c17...a6a9b99b03(40 chars) - SHA-256:
9f86d081884c...1c21fb15(64 chars)
Same input, three totally different fingerprints. Length tells you the algorithm at a glance.
Where Indian developers actually use this
Razorpay webhook verification
Say your Razorpay webhook secret is mySecret_FY2526 and a webhook arrives with body {"event":"payment.captured","payload":{...}}. Razorpay computes HMAC-SHA256 using your secret as the key and sends the result in the X-Razorpay-Signature header. Your server re-computes the same HMAC and compares. If you're debugging mismatches — and every Razorpay integrator has spent a Saturday night on this — pasting the raw body into the hash generator lets you confirm whether your JSON serialization is adding extra whitespace, changing key order, or escaping unicode differently than Razorpay expects. A missing trailing newline is often the culprit.
PayU request hash
PayU's older but still widely used integration requires merchants to compute a SHA-512 hash of a pipe-separated string: key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||salt. If you're integrating PayU for a Kota-based coaching startup charging ₹24,999 per course, getting the hash wrong means every checkout fails with "hash mismatch". The tool here supports SHA-256 — for SHA-512 you'd need a code snippet — but the debugging workflow is identical: build the concatenated string, hash it, compare against what your server generated, spot the difference.
File integrity for downloads
When NIC, MeitY, or an IIT publishes a PDF, installer, or dataset, they often publish a SHA-256 hash alongside. Downloaded a 2.4 GB ONDC seed dataset on a patchy JioFiber connection and want to know it's not corrupted? Hash the file locally and compare. The browser tool here handles text; for binary files you'd typically use sha256sum on Linux or Get-FileHash in PowerShell, but the underlying concept is the same.
Deduplication and cache keys
A Bangalore-based image CDN I helped audit was storing user uploads keyed by SHA-256 of the file contents. If two sellers on their platform uploaded the identical product photo (say, a stock image of a Nike shoe), only one copy sat in S3 — the second upload returned the existing URL. They saved roughly ₹1.8L per month in storage costs this way. The hash is the primary key.
GST and PAN tokenization
If you're building an analytics dashboard that logs which GSTINs your platform has processed but you don't want raw 15-character GST numbers sitting in your analytics warehouse, hashing them with SHA-256 gives you a stable pseudonymous identifier. You can count unique GSTINs without storing the real value. Same pattern works for PAN tokenization in internal logs. (Pair this with Base64 encoding when you need to stuff the hash into a URL-safe format.)
Walking through the tool
The interface is intentionally minimal. Paste or type your input into the text area, and all three hashes (MD5, SHA-1, SHA-256) compute instantly in your browser — no network call, nothing sent to a server. That matters: if you're hashing a webhook payload that contains a customer's phone number, UPI VPA like priyanka@okhdfcbank, or partial card details for a signature test, you don't want that text leaving your machine. Everything runs in JavaScript via the browser's SubtleCrypto API.
Three things to watch when you use it:
- Whitespace is significant.
"hello"and"hello "(with a trailing space) produce entirely different SHA-256 outputs. If you're matching a server-computed hash, inspect your input for stray spaces, tabs, or newlines. - Encoding matters. The tool treats input as UTF-8. If the system you're comparing against uses UTF-16 or Latin-1, hashes won't match even when the "text" looks identical — this comes up with older enterprise Java systems at some banks.
- Case sensitivity. "Amit" and "amit" are different inputs. This sounds obvious but is the #1 reason PAN-based or email-based hash lookups mismatch — normalize case before hashing.
Hashing vs encoding vs encryption — stop mixing them up
Developers at every level occasionally confuse these three, and in code reviews at places like Flipkart or Zerodha this confusion gets flagged hard. Quick mental model:
- Encoding (like Base64) is reversible, has no key, and is meant for data transport — e.g., embedding an image in an email. Anyone can decode Base64; it's not a security measure.
- Encryption (AES, RSA) is reversible with a key and meant to keep data secret from parties who don't hold the key.
- Hashing (MD5, SHA-256) is one-way, has no key by default, and is meant to verify integrity or identity.
HMAC — what Razorpay webhooks use — is a hash with a secret key, giving you both integrity and authentication. If someone asks "how do I decrypt this SHA-256", gently redirect them: there's no decryption, only brute force or lookup.
Common pitfalls that cost real money
Logging the secret. I've seen teams print their Razorpay webhook secret in error logs while debugging a hash mismatch, then push those logs to a shared Slack channel. Rotate the secret immediately if this happens — assume it's compromised.
Trusting MD5 for anything auth-related. A fintech startup in Gurugram was using MD5 of userId + timestamp as a "secure" referral link token. A security audit from a client bank flagged it as a P1, and they had to rebuild the referral system before a ₹35 crore partnership could close. Use HMAC-SHA256 for tokens.
Ignoring timing attacks. When comparing two hashes server-side, use a constant-time comparison function (crypto.timingSafeEqual in Node.js, hmac.compare_digest in Python). A naive == can leak information about which byte differs first. Realistically, this matters for high-value APIs — payment gateways, auth tokens — not your internal cache key check.
Hashing JSON with inconsistent key order. {"a":1,"b":2} and {"b":2,"a":1} are semantically identical JSON but produce different SHA-256 hashes. If both ends need to agree, serialize deterministically (sorted keys, no extra whitespace). This bites teams converting legacy XML APIs to JSON — pair XML to JSON conversion with careful key ordering before hashing.
Beyond debugging — using hashes in product work
Once you internalize what hashes do, patterns start to show up everywhere. A few examples from real Indian product work:
- Idempotency keys. If a user taps "Pay ₹2,499" twice on a laggy 4G connection, you want the second request to be a no-op, not a double charge. Hashing
userId + orderId + amount + timestamp-rounded-to-minuteinto an idempotency key, stored in Redis for 15 minutes, solves this cleanly. - Static asset cache busting. Rename
app.jstoapp.9f86d081.jswhere the suffix is the first 8 chars of its SHA-256. When the file changes, the URL changes, CDN caches invalidate automatically. This pairs well with a JavaScript minifier in your build pipeline — minify first, then hash the minified output. - Change detection in configs. Store the SHA-256 of your last-synced Firebase remote config. On next launch, compare — only fetch if the server hash differs. Saves bandwidth for users on metered mobile data.
- Audit trails. Hash every document uploaded to your KYC system with SHA-256 and store the hash in an append-only log. If anyone ever claims a PDF was tampered with post-upload, re-hash and compare.
These aren't exotic patterns — they're routine in any production system handling real traffic. The hash function is the same primitive doing different jobs.
Questions real developers ask about this
Is SHA-256 enough for 2026, or should I use SHA-3?
SHA-256 is still considered secure. No practical collision or preimage attack exists. SHA-3 (Keccak) is a newer design with different internals, useful as a hedge if SHA-2 is ever broken, but for almost all current work — webhooks, file integrity, API signatures — SHA-256 is the correct choice and what every major Indian payment gateway and government API uses.
Why does my Node.js SHA-256 not match my Python SHA-256 for the same string?
99% of the time it's encoding. Node's crypto.createHash('sha256').update(str).digest('hex') defaults to UTF-8. If your Python code is hashing bytes from a different encoding, or there's a hidden BOM character, you'll get different digests. Print both input byte arrays before hashing and compare.
Can I use MD5 just for a quick sanity check?
For non-security use — "did this file change" in a dev script — yes, MD5 is fine and faster than SHA-256. Just don't let it leak into any auth, signature, or integrity-against-attacker use case. The fact that it's "quick" is exactly why reviewers push back when it shows up in PRs.
Does the hash change if I just add a newline?
Absolutely. "GSTIN29AABCU9603R1Z2" and "GSTIN29AABCU9603R1Z2\n" produce entirely different SHA-256 hashes. This is often why hashes don't match between cat file | sha256sum and a copy-pasted string — the file has a trailing newline, the paste doesn't.
Whether you're verifying a Razorpay signature at 11 PM before a sale goes live, building a deterministic cache key for a product catalog, or just confirming that 1.6 GB download from an NIC mirror didn't get corrupted — the primitive is the same. Open the Hash Generator → and paste your input to compute MD5, SHA-1, and SHA-256 side by side.