Hash Generator

The Hash Generator computes MD5, SHA-1, SHA-256, SHA-384, SHA-512 and HMAC digests entirely in your browser. Warning: MD5 and SHA-1 are cryptographically broken — never use them for passwords, signatures or certificates, only for checksums.

Free online tool · Generators · No installation · No sign-up required

Overview

A hash generator is a crucial tool that transforms any given data into a fixed-length string of characters, known as a hash. This process is a cornerstone of modern cryptography and data integrity verification. By employing algorithms like MD5, SHA-256, and SHA-512, the generator creates a unique digital fingerprint for any input, be it a simple text message, a password, or an entire file. This fingerprint is deterministic, meaning the same input will always produce the same output. This characteristic is fundamental for verifying that data has not been altered, as even the slightest change to the input will result in a completely different hash, a phenomenon known as the avalanche effect. The one-way nature of these cryptographic functions ensures that the original data cannot be reverse-engineered from the hash, providing a secure method for data validation and protection.

Technically, a hash generator operates on the principle of a one-way mathematical function. When you input data, the chosen algorithm processes it through a series of complex operations, including bitwise operations, modular additions, and compression functions. The result is a hash value of a specific length, such as 128 bits for MD5 or 256 bits for SHA-256. This process is irreversible by design, making it computationally infeasible to reconstruct the original input from the output hash. The security of a hash function is also defined by its collision resistance; it should be extremely difficult to find two different inputs that produce the same hash output. This property is vital for ensuring that a digital fingerprint is genuinely unique to the specific data it represents, thereby guaranteeing its integrity and authenticity in various applications.

The importance of hash generators extends across numerous domains of computer science and cybersecurity. One important application is in password storage, though it must be done correctly: systems do not store passwords in plaintext but they also should not store a bare MD5 or SHA-256 hash of them. Production systems use a deliberately slow, salted password-hashing function such as bcrypt, scrypt or Argon2, because a fast hash like MD5 or SHA-1 can be brute-forced at enormous speed and both have practical collision attacks. This tool is the right instrument for checksums, not for password storage. Hash generators are also essential for verifying file integrity: software developers often provide a hash of their files, allowing users to confirm that the downloaded file has not been corrupted or tampered with. Furthermore, hashing is a fundamental component of blockchain technology, where it ensures the immutability of transaction records in a distributed ledger.

Worked example

A published checksum verified against a pasted file

A download page lists an MD5 and a SHA-256 checksum for a small text file, and the file content is short enough to paste; the same text also has to be turned into a keyed digest for an API test.

  1. Tick MD5 and SHA-256, paste The quick brown fox jumps over the lazy dog (43 characters, no trailing newline) and press Generate.
  2. MD5 returns 9e107d9d372bb6826bd81d3542a419d6 and SHA-256 returns d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592.
  3. Both match the published values, which is the whole point: a checksum comparison only proves that the bytes are identical, not that the file is safe.
  4. Tick SHA-1, SHA-384 and SHA-512 as well and the outputs come back as 40, 96 and 128 hex characters respectively; MD5 and SHA-1 are marked as unsuitable for passwords and signatures.
  5. Paste the published value into the Compare Hashes box next to the computed one and press Compare. Equal lengths are read as the same algorithm, and the answer is that the hashes match, naming SHA-256.
  6. Enable HMAC, type the shared secret as the key and keep SHA-256 selected. With the key secret the digest for the same text becomes 54cd5b827c0ec938fa072a29b177469c843317b095591dc846767aa338bac600, which is completely different from the unkeyed value.

Result: The pasted text matches both published checksums, and the keyed digest for the API test is a different value from the plain SHA-256 of the same text. Any change to the input, including one added newline at the end, changes every digest, which is what makes the comparison meaningful.

How to use Hash Generator

  1. Enter text
  2. Select algorithm
  3. View hash
  4. Copy or compare

Common mistakes

Storing user passwords as SHA-256 or MD5 hashes.

These are fast general-purpose digests: a leaked table can be attacked at billions of guesses per second on commodity hardware, and MD5 also has practical collisions. Passwords need a slow, salted key derivation function such as bcrypt, scrypt or Argon2.

Hashing text and comparing it with a checksum calculated from the file on disk.

The digest covers the exact bytes, so a trailing newline, a CRLF line ending or a byte-order mark changes it. Use the file input on the same file you downloaded rather than retyping or copying its contents.

Comparing an MD5 with a SHA-256 and reading the answer as a mismatch.

The compare box validates first: different lengths are reported as two different algorithms, which is the useful answer. All five algorithms here have distinct hex lengths, so the length alone identifies the algorithm.

Pressing Generate with an empty text box and expecting an error.

An empty input is valid and hashes the empty string: SHA-256 of nothing is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. Check that a file was actually loaded before trusting that value as the digest of your data.

Features

Limits worth knowing

When to use it

Practical tips

Why use this tool

When this is not the right tool

Frequently asked questions

What is a hash?

A one-way function that converts input to a fixed-size string. The same input always produces the same hash, and any change produces a completely different one.

Which algorithm should I use?

SHA-256 for anything security-related, or HMAC with a key for message authentication. MD5 and SHA-1 are supported for legacy checksums only: both are cryptographically broken and must never be used for passwords, signatures or certificates.

Can I use this to store passwords?

No. Fast hashes such as MD5, SHA-1 and even SHA-256 are the wrong tool for password storage. Use a slow, salted password-hashing function such as bcrypt, scrypt or Argon2 instead.

Can I decrypt a hash?

No, hash functions are one-way by design. There is no key and no reverse operation, which is why a matching hash can confirm integrity but cannot reveal the original input.

Related tools in Generators

Further reading

Hash Generator: Create MD5, SHA-256, and Other Hashes

Generate cryptographic hashes for text and files. Supports MD5, SHA-1, SHA-256, SHA-512, and more.