Hash Generator - MD5, SHA-256, SHA-512

Free online hash generator. Compute MD5, SHA-1, SHA-256, SHA-512, SHA-3, bcrypt and HMAC from text or files — all in your browser, nothing uploaded.

By

Advertisement

Hash Generator: Every Common Algorithm at Once

This hash generator computes MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA-3 and bcrypt from the same input, side by side, so you can compare digests without opening a different tool for each algorithm. Type or paste text, or drop in one or more files, and every algorithm you have ticked produces its digest immediately. Everything runs in your browser — no text and no file contents are transmitted anywhere, which matters when the thing you are hashing is a password candidate, a config file or a sample of suspected malware.

Beyond straight hashing, the tool includes HMAC mode for keyed digests, a hash identifier that works out what algorithm produced an unknown digest, a comparison view for checking a computed hash against an expected value, batch file hashing, a session history of previous results, upper/lowercase output, and a use-case selector that recommends the right algorithm for password storage, file integrity, digital signatures, HMAC authentication or legacy compatibility.

How to Generate a Hash

  1. Pick your input mode. The Text tab hashes whatever you type or paste; the File tab hashes files you select or drag in, including several at once with a progress indicator for large ones.
  2. Select algorithms. Tick individual algorithms, or use Select All to generate every hash at once, All Recommended for the modern ones only, or let the use-case selector choose for you.
  3. Enable HMAC if you need a keyed digest. Switch on HMAC mode and supply a secret; the digest becomes HMAC-MD5, HMAC-SHA-256 and so on, matching what an API signature check expects.
  4. Read and copy. Each result shows the digest, its length, and whether the algorithm is considered weak or recommended. Output can be switched between lowercase and uppercase hex to match whatever you are comparing against.
  5. Compare or identify. Paste an expected value into the comparison panel for a constant-visual match check, or paste an unknown hash into the hash identifier to see which algorithms could have produced it.

Algorithm Comparison

Digest length is the quickest way to narrow down an unknown hash, and the security column is the quickest way to decide whether you should still be using one.

AlgorithmOutputHex charactersStatusReasonable use today
MD5128-bit32Broken — practical collisions since 2004Non-security checksums, malware sample IDs, matching legacy records
SHA-1160-bit40Broken — SHAttered collision, 2017Legacy interop only; never for signatures
SHA-256256-bit64SecureThe default choice: integrity, signatures, certificates, blockchain
SHA-384384-bit96SecureTruncated SHA-512; common in TLS cipher suites
SHA-512512-bit128SecureFaster than SHA-256 on 64-bit CPUs; larger margin
SHA-3 (256-bit)256-bit64SecureDifferent internal design (sponge construction) from the SHA-2 family
bcrypt184-bit encoded60-char $2a$ stringSecure and deliberately slowPassword storage — and only password storage

A worked example makes the length rule concrete. Hashing the string hello with MD5 gives 5d41402abc4b2a76b9719d911017c592 — 32 hex characters. The same input through SHA-1 gives 40 characters, through SHA-256 gives 64, and through SHA-512 gives 128. bcrypt looks nothing like the others: it produces a self-describing string such as $2a$10$... where 2a is the variant and 10 is the cost factor, and it embeds a random salt, so hashing the same password twice deliberately yields two different strings.

Can You Convert MD5 to SHA-256?

No — and this is worth stating plainly, because “md5 to sha256 converter” is one of the most common things people search for. A hash is a one-way function. An MD5 digest is 128 bits of output derived from input of any size; the original input is not recoverable from it, so there is nothing to feed into SHA-256. The only way to obtain the SHA-256 of some data is to have the data itself.

What people usually want is one of two things. Either they have the original text and need both digests — in which case tick MD5 and SHA-256 together here and you get both from one input. Or they have inherited a system storing MD5 password hashes and need to migrate it to something modern. The migration pattern for that is to hash on next login: when a user authenticates successfully against the stored MD5, recompute the password with bcrypt, store the new hash, and drop the old one. There is no bulk conversion path, by design.

Cracking, Rainbow Tables and What This Tool Does Not Do

This is a generator, not a cracker. It computes digests forward; it does not reverse them, and it does not run dictionary or rainbow-table lookups. That distinction matters because the two are often conflated. A rainbow table is a precomputed structure that trades storage for time to reverse unsalted hashes, which is precisely why every serious password hashing scheme adds a per-user salt — a salt makes precomputation worthless, since the attacker would need a separate table per salt value.

If your goal is threat intelligence rather than cracking, compute a file’s SHA-256 here and then check it against known-malware corpora using the hash lookup tool. If you want to work out what algorithm an unknown digest came from before doing anything else with it, the built-in hash identifier reads the length and format and reports the candidates with a confidence rating — and for a bcrypt string it can verify a candidate password directly.

Choosing the Right Algorithm

The single most common mistake is using a fast general-purpose hash for passwords. MD5, SHA-1 and the whole SHA-2 family are designed to be fast, which is exactly what an attacker with a GPU wants: billions of guesses per second. bcrypt is designed to be slow and to have a tunable cost factor, so you can raise the work per guess as hardware improves. For password storage, choose bcrypt (this tool uses a cost factor of 10) or an equivalent adaptive function.

For everything else, the fast hashes are correct. File integrity and checksums, deduplication, content addressing, digital signature input, and certificate fingerprints all want SHA-256. Use HMAC — not a plain hash of key concatenated with message — whenever you are authenticating a message with a shared secret, because naive concatenation is vulnerable to length-extension attacks against SHA-2. If you need subresource integrity attributes for a script or stylesheet tag, the dedicated SRI hash generator produces the base64 format browsers expect.

Understanding Cryptographic Hash Functions

What Are Hash Functions?

Cryptographic hash functions are mathematical algorithms that convert input data of any size into a fixed-size string of characters, called a hash or digest. These functions are fundamental to modern cybersecurity and are used in:

  • Password storage - Storing password hashes instead of plaintext
  • Data integrity verification - Ensuring files haven't been modified
  • Digital signatures - Authenticating documents and software
  • Blockchain technology - Securing cryptocurrency transactions
  • Malware identification - Creating unique fingerprints for malicious files

Key Properties

  1. Deterministic - Same input always produces the same hash
  2. Fast computation - Hashes can be calculated quickly
  3. Pre-image resistance - Cannot reverse a hash to get the original input
  4. Avalanche effect - Small input changes produce drastically different hashes
  5. Collision resistance - Extremely difficult to find two inputs with the same hash

These properties make hash functions essential security tools, but different algorithms provide varying levels of security and performance.

Hash Algorithms: Security Comparison

Choosing the Right Algorithm

Deprecated (Do Not Use for Security)

MD5 (128-bit)

  • ❌ Cryptographically broken since 2004
  • ❌ Vulnerable to collision attacks
  • ✅ Still acceptable for non-security checksums
  • Common use: Legacy file verification only

SHA-1 (160-bit)

  • ❌ Deprecated by NIST in 2017
  • ❌ Practical collision attacks demonstrated by Google (2017)
  • ❌ Not acceptable for certificates, signatures, or security
  • Common use: Git commits (non-security context)

Secure General-Purpose Algorithms

SHA-256 (256-bit)

  • ✅ Current industry standard
  • ✅ Used in Bitcoin, TLS certificates, code signing
  • ✅ No known practical attacks
  • ✅ Excellent balance of security and performance
  • Recommended for: File integrity, digital signatures, general cryptographic use

SHA-512 (512-bit)

  • ✅ Higher security margin than SHA-256
  • ✅ Faster on 64-bit systems
  • ✅ Slower on 32-bit systems
  • Recommended for: High-security applications, long-term data protection

SHA-3 (256-bit)

  • ✅ Alternative to SHA-2 with different internal design
  • ✅ NIST standard since 2015
  • ✅ Future-proofing against SHA-2 weaknesses
  • Recommended for: New applications wanting alternative to SHA-2

Password Hashing (Specialized Algorithms)

bcrypt

  • ✅ Industry standard for password storage
  • ✅ Adjustable work factor (adaptive)
  • ✅ Built-in salt generation
  • ✅ Resistant to GPU/ASIC attacks
  • Recommended for: Web application passwords, user authentication

scrypt

  • ✅ Memory-hard function
  • ✅ Resistant to hardware attacks
  • ✅ Higher resource requirements than bcrypt
  • Recommended for: High-security password storage, cryptocurrency wallets

Never use general-purpose hash functions (MD5, SHA-256) for password storage - always use specialized password hashing algorithms with proper salting and work factors.

Malware Analysis with File Hashing

Using Hashes for Malware Detection

File hashing is a cornerstone of malware analysis and incident response. Security researchers and analysts use cryptographic hashes to:

1. Malware Identification

Every malware sample has a unique hash fingerprint (unless it's polymorphic). When you hash a suspicious file, you can:

  • Check against threat databases - Compare the hash to millions of known malware signatures
  • Share threat intelligence - Researchers use hashes to communicate about specific samples
  • Track malware families - Related malware variants can be linked through hash analysis
  • Automate detection - Security tools scan filesystems for known malicious hashes

2. Threat Intelligence Databases

Several free services accept file hashes for malware lookup:

VirusTotal

  • Scans files against 70+ antivirus engines
  • Provides detailed analysis reports
  • Shows detection names from different vendors
  • Includes community comments and file metadata
  • API available for automation

MalwareBazaar (abuse.ch)

  • Curated database of recent malware samples
  • Focuses on current threats
  • Provides malware family classification
  • Free API for bulk lookups
  • Includes C2 server indicators

Hybrid Analysis

  • Advanced sandbox analysis
  • Behavior and network traffic analysis
  • Registry and file system modifications
  • Screenshots of malware execution
  • YARA rule matching

3. Best Practices for Hash-Based Detection

Use Multiple Algorithms

  • MD5 and SHA-1 are still used in malware databases for historical compatibility
  • SHA-256 is the current standard and should always be included
  • Submit all three hashes when checking threat intelligence

Understand Limitations

  • Hash-based detection only works for known malware
  • Polymorphic malware changes its hash with each infection
  • Packers and obfuscation defeat simple hash matching
  • Zero detections doesn't guarantee a file is safe

Combine with Behavior Analysis

  • Hash matching should be part of layered security
  • Sandbox analysis detects unknown threats
  • Behavioral monitoring catches evasive malware
  • Machine learning identifies suspicious patterns

Privacy Considerations

  • Never upload sensitive files to public services
  • Use hash-only lookups when possible
  • Consider on-premises threat intelligence platforms for sensitive data
  • Some services retain uploaded files indefinitely

4. Incident Response Workflow

When investigating a suspicious file:

  1. Isolate the system - Prevent potential malware spread
  2. Hash the file - Calculate MD5, SHA-1, and SHA-256
  3. Check threat databases - Use VirusTotal and MalwareBazaar
  4. Analyze results - High detection rate indicates known malware
  5. Research indicators - Look for file metadata, C2 servers, IOCs
  6. Document findings - Create incident report with hash values
  7. Update defenses - Add hashes to blocklists and EDR rules

Hash-based detection remains an essential tool for security teams, but it must be combined with modern techniques like behavioral analysis and machine learning to catch evolving threats.

HMAC: Message Authentication

What is HMAC?

HMAC (Hash-based Message Authentication Code) combines a cryptographic hash function with a secret key to provide both data integrity and authentication.

How HMAC Differs from Regular Hashing

Regular Hash

  • Anyone can compute the hash
  • Verifies data integrity only
  • Cannot prove who created it
  • Example: SHA-256(message)

HMAC

  • Requires secret key to compute
  • Verifies integrity AND authenticity
  • Proves sender knows the secret key
  • Example: HMAC-SHA256(message, secret)

Common Use Cases

API Authentication

  • AWS signatures use HMAC-SHA256
  • Webhook verification (Stripe, GitHub)
  • Request signing to prevent replay attacks

Cookie Integrity

  • Web frameworks use HMAC to prevent cookie tampering
  • Ensures session data hasn't been modified by clients

Message Authentication

  • Email authentication (DKIM)
  • VPN and encrypted communications
  • Challenge-response protocols

Security Considerations

  • Both parties must securely share the secret key
  • Use strong hash functions (SHA-256 or better)
  • Never use HMAC-MD5 or HMAC-SHA1 for new applications
  • Rotate keys periodically for high-security applications
  • Use constant-time comparison to prevent timing attacks

HMAC is not suitable for password hashing - use bcrypt, scrypt, or Argon2 instead.

Frequently Asked Questions

Is this hash generator free and does it work online?+

Yes, it is free with no registration, and it runs entirely in your browser. Once the page has loaded, the hashing itself needs no network connection.

Are my files or text uploaded anywhere?+

No. Text and file contents are hashed locally in JavaScript and never transmitted. Files are read with the browser’s File API and stay on your machine.

Can I generate all hashes at once?+

Yes — that is the point of the algorithm selector. Select All ticks every supported algorithm, so a single input produces MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA-3 and bcrypt together.

Can this tool crack or decrypt an MD5 hash?+

No. Hashing is one-way and this tool only computes hashes. Nothing here reverses a digest or performs dictionary lookups.

How do I identify an unknown hash?+

Paste it into the hash identifier. A 32-character hex string points to MD5 or NTLM, 40 to SHA-1 or RIPEMD-160, 64 to SHA-256 or SHA-3-256, 128 to SHA-512, and a string beginning $2a$, $2b$ or $2y$ is bcrypt.

Why do two runs of bcrypt on the same password give different results?+

Because bcrypt generates a fresh random salt each time and stores it inside the output string. That is correct behaviour — verification works by extracting the salt from the stored hash and re-running the function, which the tool’s verify field does for you.

Is MD5 safe to use for anything?+

Only where an adversary is not involved. It remains fine as a fast checksum for accidental corruption and as an identifier for malware samples, because incident response corpora are indexed by it. It is unsafe for passwords, signatures, or any case where someone might deliberately construct a collision.

What is HMAC and when do I need it?+

HMAC combines a hash function with a secret key to produce a digest only holders of the key can compute. Use it for API request signing and webhook verification. Switch on HMAC mode and enter your secret to produce HMAC-SHA-256 and the other keyed variants.

Can I hash multiple files at once?+

Yes. Select or drag in several files and each is hashed in turn with a per-file progress indicator, with results grouped by file.

Uppercase or lowercase hex — does it matter?+

Not cryptographically; they represent the same bytes. It matters only for string comparison, which is why the output format toggle exists — set it to match whatever value you are checking against.

Related tools

This tool is provided for informational and educational purposes only. While we strive for accuracy, we make no warranties about the completeness or reliability of results. Results are based on the information you enter and do not constitute a security audit, a formal compliance assessment, or legal advice, and they do not establish that any system or organisation meets a given standard. Coverage of a framework may be partial — check what the tool states it assesses. For anything you intend to rely on, consult a qualified assessor.