Hash Generator - MD5, SHA-1 & SHA-256 Online (Free)

Generate MD5, SHA-1, SHA-256, SHA-384 & SHA-512 hashes instantly. Free online hash generator - runs in your browser, nothing uploaded. Copy hex or base64.

Text to hashor hash a file
Hashes
MD5
SHA-1
SHA-256
SHA-384
SHA-512
Verify a checksumpaste a hash to see which algorithm it matches (hex or base64)

All hashing runs in your browser — nothing is uploaded.

Generate a Hash from Any Text or String - Instantly

Paste or type any text above and this hash generator spits out its MD5, SHA-1, SHA-256, SHA-384, and SHA-512 digests in one click. Useful for verifying file integrity, creating checksums, building Content Security Policy (CSP) hashes, or just checking that two pieces of text are identical without comparing them character by character.

Your data never leaves your browser. All hashing runs locally in JavaScript using the Web Crypto API - nothing is sent to any server.

How to Use This Hash Generator

  1. Type or paste your text into the input box above.
  2. Choose an algorithm from the dropdown (MD5, SHA-1, SHA-256, SHA-384, or SHA-512).
  3. Pick your output format: hex (the default) or base64 (needed for Subresource Integrity / SRI tags).
  4. The hash digest appears instantly - click Copy to grab it.
  5. To verify a checksum, paste a known hash into the "Compare" field and the tool highlights whether they match.

Worked Example

Input text: Hello, World!

Algorithm Hex digest
MD565a8e27d8879283831b664bd8b7f0ad4
SHA-10a0a9f2a6772942557ab5355d76af442f8f65e01
SHA-256dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986d

Change even one character - say Hello, World! to hello, World! - and every single digest changes completely. That's the avalanche effect: a tiny input change scrambles the whole output.

Algorithm Comparison: Which Hash Should You Use?

Algorithm Digest size Hex chars Cryptographically secure? Best for
MD5 128-bit 32 ✘ Broken Non-security checksums only
SHA-1 160-bit 40 ✘ Broken Legacy systems, Git object IDs
SHA-256 256-bit 64 ✔ Yes Signatures, TLS, SRI, general security
SHA-384 384-bit 96 ✔ Yes Higher-assurance security needs
SHA-512 512-bit 128 ✔ Yes Maximum digest length, archive integrity

Quick rule: reach for SHA-256 by default. Use MD5 or SHA-1 only when an existing system requires it - not for passwords, tokens, or anything security-sensitive.

Important: Hashes Are One-Way - They Cannot Be 'Decrypted'

A hash function converts input into a fixed-length digest. That process is irreversible by design - you cannot run a hash backwards to recover the original text. What people call "MD5 decryptors" online are actually lookup tables: they check whether your hash appears in a database of pre-computed hashes for common inputs. Long, random, or unique strings will not appear in any table.

This one-way property is exactly what makes hashes useful for integrity checks: two files with the same SHA-256 digest are, for all practical purposes, identical.

MD5 and SHA-1 Are Cryptographically Broken - Here's What That Means

Researchers have demonstrated collision attacks against both MD5 and SHA-1 - meaning it is possible (with enough computing power) to craft two different inputs that produce the same hash. That breaks any use case that relies on uniqueness for security. For file checksums where you just want to confirm a download wasn't corrupted, MD5 is still fine. For digital signatures, password storage, or anything adversarial, use SHA-256 or higher. NIST formally deprecated SHA-1 for most uses in 2011.

How to Generate Hashes in Code

Python

import hashlib

text = 'Hello, World!'

print(hashlib.md5(text.encode()).hexdigest())     # MD5
print(hashlib.sha1(text.encode()).hexdigest())    # SHA-1
print(hashlib.sha256(text.encode()).hexdigest())  # SHA-256

All three algorithms are part of Python's built-in hashlib module - no install needed.

JavaScript (Node.js)

const crypto = require('crypto');

const text = 'Hello, World!';

console.log(crypto.createHash('md5').update(text).digest('hex'));     // MD5
console.log(crypto.createHash('sha1').update(text).digest('hex'));    // SHA-1
console.log(crypto.createHash('sha256').update(text).digest('hex'));  // SHA-256

In a browser context, use the Web Crypto SubtleCrypto.digest() API instead (MD5 is not available there - another reason to prefer SHA-256).

Generating SRI Hashes (base64 output)

Subresource Integrity (SRI) is a browser security feature that lets you lock a <script> or <link> tag to a specific file version. The hash must be base64-encoded SHA-256 (or higher). Switch this tool's output to base64, choose SHA-256, paste your script content, and prepend sha256- to get a ready-to-use integrity attribute value.

When to Use a Hash Generator - and When Not To

  • Use it for: verifying download integrity, building SRI tags, comparing strings without exposing their content, generating cache-busting keys, and creating unique identifiers from deterministic input.
  • Do not use it for: storing passwords (use a slow, salted algorithm like bcrypt, Argon2, or scrypt instead), encrypting data (hashing is not encryption - there is no key and no way to reverse it), or any use case where you need to recover the original value.

Need to work with a single algorithm? Our focused MD5 Hash Generator and SHA-256 Hash Generator are great if you only need one digest at a time.

The NIST hash function standards page is the authoritative reference for which algorithms are recommended and which have been deprecated.

Every hash you need, right in your browser - paste your text above and grab the digest in seconds.

Frequently asked questions

Is my data uploaded to a server when I generate a hash?+
No. Everything runs locally in your browser using JavaScript. Your text is never sent anywhere. You can even disconnect from the internet and the tool will still work.
What is the difference between a hash and encryption?+
Encryption is two-way: you can decrypt it back with the right key. Hashing is one-way: the digest cannot be reversed into the original input. Use encryption when you need to recover data later; use hashing when you only need to verify or fingerprint it.
Can I use this to check if a downloaded file is safe?+
Yes - paste or type the file's content (or the filename/path string you're checking), generate the hash, and compare it to the checksum the publisher provides. A match means the file hasn't been altered. For actual file binary hashing, use a command-line tool like sha256sum (Linux/Mac) or Get-FileHash (PowerShell).
Which hash algorithm should I use?+
SHA-256 is the right default for almost everything. MD5 and SHA-1 are fine for non-security checksums where you just want to detect accidental corruption, but they are cryptographically broken and should not be used for passwords, digital signatures, or security tokens.
Why does the same input always produce the same hash?+
Hash functions are deterministic - identical input always produces identical output. That's what makes them useful for verification. Change even one character and the digest changes completely (the avalanche effect).
How do I generate a SHA-256 hash in Python?+
Use the built-in hashlib module: import hashlib; hashlib.sha256('your text'.encode()).hexdigest(). No third-party packages needed.
What is base64 output used for?+
Base64 encoding of a hash is required for Subresource Integrity (SRI) attributes in HTML - for example, integrity='sha256-<base64hash>' on a script tag. Switch the output format to base64 in the tool to generate SRI-ready hashes.
Is this tool free? Do I need to sign up?+
Completely free, no account required. Open the page and start hashing immediately.