<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons&display=swap">

Hash Generator

Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 cryptographic hashes. Instant hash calculation with multiple algorithms.

Input Text

0 characters

Hash Results

🔐

Enter text and click a button to generate hashes

What is a Cryptographic Hash?

A cryptographic hash function takes an input of any size — a word, a password, or an entire file — and deterministically produces a fixed-length string of characters called a hash (or digest). The same input always produces the same hash, but even a single-character change to the input produces a completely different, unpredictable output. This is known as the avalanche effect.

Hashing is a one-way operation: you cannot reverse a hash back into its original input. That property is what makes hashes useful for verifying data integrity and storing secrets like passwords — you can check whether two pieces of data match by comparing their hashes without ever exposing the original data itself.

What is a Hash Generator?

This Hash Generator computes cryptographic hashes of text or file contents directly in your browser, supporting MD5, SHA-1, SHA-256, SHA-384, and SHA-512. You can generate a single algorithm's hash on demand, or run all five at once to compare them side by side.

You can type or paste text into the input box, or upload a file to hash its contents. Output can be viewed as hexadecimal (the standard, most common representation) or Base64 (a more compact encoding). Every hash can be copied individually, and all generated hashes can be downloaded together as a single text file.

Why Generate Hashes?

  • File integrity verification — compare a file's hash against a publisher-provided checksum to confirm a download wasn't corrupted or tampered with in transit.
  • Data deduplication — identical files or strings always produce identical hashes, making hashes a fast way to detect duplicates without comparing full contents.
  • Learning and testing — understand how password hashing, digital signatures, or checksum systems work by generating and comparing hashes for known inputs.
  • Quick fingerprinting — generate a short, unique identifier for a piece of text or data without storing the full content.
  • Cross-checking application output — verify that a hash produced by your own code (in a script, database, or API) matches what a trusted reference implementation produces.

Features of This Tool

Supports MD5 (128-bit), SHA-1 (160-bit), SHA-256 (256-bit), SHA-384 (384-bit), and SHA-512 (512-bit)
Generate a single selected algorithm's hash, or generate all five algorithms at once for comparison
Choose hexadecimal or Base64 output format
Hash typed or pasted text, or upload a file and hash its contents
Live character count for the input text
Copy any individual hash to the clipboard with one click
Download all generated hashes together as a single .txt file
Load a sample text to try the tool instantly
Runs entirely in your browser — your text and files are never uploaded to a server

How to Use the Hash Generator

  1. 1

    Provide your input

    Type or paste text into the input box, or use "Upload file" to load the contents of a file from your device.

  2. 2

    Choose an output format

    In the Actions panel, select "Hexadecimal" (the standard representation) or "Base64" for a more compact encoded output.

  3. 3

    Pick an algorithm (optional)

    Select which algorithm to use for a single hash — MD5, SHA-1, SHA-256, SHA-384, or SHA-512 — from the "Select Algorithm" dropdown.

  4. 4

    Generate the hash(es)

    Click "Generate [Algorithm]" to compute just the selected algorithm, or "Generate All Hashes" to compute all five algorithms at once for comparison.

  5. 5

    Copy or download

    Click "Copy" next to any individual hash to copy it to your clipboard, or "Download All" to save every generated hash as a text file.

Common Mistakes and Pitfalls

Confusing hashing with encryption

Hashing is one-way and cannot be reversed or "decrypted" — there is no key to get the original text back. If you need to recover the original data later, you need encryption, not hashing.

Using MD5 or SHA-1 for security purposes

MD5 and SHA-1 are cryptographically broken — attackers can deliberately construct two different inputs that produce the same hash (a collision). They're still fine for non-adversarial checksums like detecting accidental file corruption, but should never be used for passwords, digital signatures, or anything security-sensitive. Use SHA-256 or higher instead.

Expecting identical hashes across whitespace differences

A trailing space, an extra newline, or different line-ending styles (\n vs \r\n) will produce a completely different hash, even though the visible text looks the same. Always compare exact byte content.

Treating hash comparisons as case-insensitive by accident

Hexadecimal hash output is often written in lowercase, but some tools output uppercase hex. The hashes 2CF24DBA... and 2cf24dba... represent the same value — normalize case before comparing strings, since a strict string comparison would otherwise report a false mismatch.

Assuming hashing passwords directly is secure

Hashing a password with a general-purpose algorithm like SHA-256 alone is not sufficient for storing user passwords — it's fast to brute-force. Real password storage should use a dedicated, slow, salted algorithm such as bcrypt, scrypt, or Argon2, not a raw cryptographic hash.

Mixing up hex and Base64 output when comparing hashes

The same hash looks completely different in hex versus Base64 (e.g. a SHA-256 hash is 64 hex characters but only 44 Base64 characters). Make sure you're comparing two hashes in the same output format.

Hash Generator Examples

SHA-256 of a short string

Generating a single SHA-256 hash (hex format) for the text "hello".

Input

hello

Output

2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Generate All Hashes for comparison

Using "Generate All Hashes" on the text "Hello, World!" produces all five algorithms at once — this is also the format used by the "Download All" text file.

Input

Hello, World!

Output

MD5: 65a8e27d8879283831b664bd8b7f0ad4
SHA-1: 0a0a9f2a6772942557ab5355d76af442f8f65e01
SHA-256: dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f
SHA-384: 5485cc9b3365b4305dfb4e8337e0a598a574f8242bf17289e0dd6c20a3cd44a089de16ab4ab308f63e44b1170eb5f515
SHA-512: 374d794a95cdcfd8b35993185fef9ba368f160d8daf432d08ba9f1ed1e5abe6cc69291e0fa2fe0006a52570ef18c19def4e617c33ce52ef0a6e5fbe318cb0387

SHA-256 with Base64 output

The same "DataUtil" input hashed with SHA-256, shown as Base64 instead of hex — more compact, useful when embedding hashes in URLs or headers.

Input

DataUtil

Output

kecolma2DFG30jHE6cg5xhPVbNceiDGXaSVt0RpqS/0=

Frequently Asked Questions

Is my text or file uploaded anywhere?

No. All hashing happens locally in your browser using JavaScript and the Web Crypto API. Your text and files are never sent to a server.

Can I convert a hash back into the original text?

No. Hashing is a one-way process by design — there is no algorithm or key that reverses a hash back into its input. This is different from encryption, which is reversible with the right key.

Which algorithm should I use?

For security-sensitive purposes (passwords, signatures, verifying authenticity) use SHA-256 or higher. MD5 and SHA-1 are fine for quick, non-adversarial checksums like verifying accidental file corruption, but should not be trusted where someone might deliberately try to forge a matching hash.

Why do MD5 and SHA-1 hashes look shorter than SHA-256?

Hash length depends on the algorithm's output size: MD5 produces 128 bits (32 hex characters), SHA-1 produces 160 bits (40 hex characters), SHA-256 produces 256 bits (64 hex characters), SHA-384 produces 384 bits (96 hex characters), and SHA-512 produces 512 bits (128 hex characters).

What's the difference between the hex and Base64 output formats?

Both represent the exact same underlying hash bytes, just encoded differently. Hexadecimal uses 0-9 and a-f and is the most commonly seen format for hashes. Base64 uses a wider character set (A-Z, a-z, 0-9, +, /) and produces a shorter string, which can be useful when space is limited.

Why did my hash change even though I barely edited the text?

This is expected — it's called the avalanche effect. Cryptographic hash functions are designed so that any change to the input, even a single character or trailing space, produces a completely different, unrelated-looking hash.

Can I hash a file instead of typing text?

Yes. Use the "Upload file" option to load a file's contents into the input box, then generate a hash exactly as you would for typed text.

Is this a good way to hash passwords for storage in an application?

No. This tool is meant for learning, testing, and checksums. Real applications should never store raw hashes of passwords using general-purpose algorithms like SHA-256 — use a dedicated, salted, slow password-hashing algorithm such as bcrypt, scrypt, or Argon2 instead.