Tools/Developer Tools/Hash Generator

Hash Generator – SHA1, SHA256, SHA384 & SHA512 Online

Free online hash generator for SHA-1, SHA-256, SHA-384, and SHA-512. 100% browser-based using the Web Crypto API - your text never leaves your device.

If this tool isn’t working as expected, please take a screenshot of the error and report the problem here so we can investigate and improve it.

About this tool

Different SHA variants trade off output length for collision resistance. SHA-1 is shorter and faster but has known collision weaknesses - avoid it for anything security-sensitive.

SHA-256 is the current general-purpose standard. SHA-384 and SHA-512 produce longer digests for applications that want more collision resistance.

None of the four are appropriate for hashing passwords - a dedicated password-hashing algorithm like bcrypt or Argon2 is designed to be slow on purpose, which is exactly what stops an attacker from testing billions of guesses per second against a stolen hash.

Generate SHA-1, SHA-256, SHA-384, or SHA-512 hashes from any text string - all four algorithms compute simultaneously using the browser's Web Crypto API, for checksum generation, hash comparison, and general-purpose text hashing.

How to Use Hash Generator

Enter Text

Type or paste any text you want to hash.

View All Hashes

SHA-1, SHA-256, SHA-384, and SHA-512 generate instantly.

Check the Output

Review the hex-encoded hash string for each algorithm.

Copy Hash

Click copy next to any algorithm to use the hash.

Common Workflows

Verifying Code/API Output

Generate a SHA-256 or SHA-512 hash of a text string to compare against a value your own code or API produced.

Text Identity Checks

Hash short pieces of text to check whether two versions are identical without a character-by-character diff.

Test Fixture Generation

Generate test fixtures for hash-based logic in your own code.

Algorithm Comparison

Explore how hash length and output differ across SHA-1, SHA-256, SHA-384, and SHA-512 for the same input.

Best For

  • Supports SHA-1, SHA-256, SHA-384, and SHA-512 - all four SHA algorithms natively available in the browser's Web Crypto API.
  • Runs in your browser using the Web Crypto API - your text never leaves your device.
  • All four algorithms compute simultaneously for the same input - compare hash lengths and output side by side.

Examples

The same text hashed with all four algorithms at once

Text

Hello

Hashes

SHA-1: f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0 (40 hex chars)
SHA-256: 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969 (64 hex chars)
SHA-384: 3519fe5ad2c596efe3e276a6f351b8fc0b03db861782490d45f7598ebd0ab5fd5520ed102f38c4a5ec834e98668035fc (96 hex chars)
SHA-512: 3615f80c9d293ed7402687f94b22d58e529b8cc7916f8fac7fddf7fbd5af4cf777d3d795a7a00a16bf7e7f3fb9561ee9baae480da9fe7a18769e71886b03f315 (128 hex chars)

All four algorithms compute from the same input simultaneously - output length grows with the algorithm name (SHA-1's 160 bits, SHA-256's 256 bits, SHA-384's 384 bits, SHA-512's 512 bits), shown here as hex characters at 4 bits each.

A one-character change produces a completely different hash

Text

"Hello" vs "hello"

SHA-256

Hello → 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
hello → 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Changing a single character - just the capitalization of the first letter - produces a totally different hash with no visible relationship to the original. This is the avalanche effect: it's what makes a matching hash meaningful as a check for exact equality.

Hashing a config value to compare across environments

Text

{"apiVersion":"v2","debug":false}

SHA-256

267f3f53523296094048236bd3812150f8ce73473ee780fbab97fd76943a8d2a

Paste the same config string from two environments and compare their SHA-256 output - identical hashes confirm the values are byte-for-byte identical, without diffing the text manually. This works well for text values like this; it isn't a substitute for a real file-checksum tool when verifying a downloaded binary file.

Use Cases

Confirming two pieces of text are byte-for-byte identical

Hash two versions of a config value, API response, or code snippet and compare the SHA-256 output instead of manually diffing long strings.

Generating test fixtures for hash-based logic

Produce a real SHA-1, SHA-256, SHA-384, or SHA-512 digest to use as expected output when writing or debugging code that hashes strings.

Learning how hash length scales with algorithm strength

Hash the same input across all four algorithms at once to see how output length and character count grow from SHA-1 up through SHA-512.

Understanding why hashing isn't reversible

See firsthand that a hash gives no way back to the original text - useful for building an accurate mental model before using hashes in real authentication or integrity-checking code.

Common Mistakes

Problem

Expecting MD5 in the output

Solution

This tool computes SHA-1, SHA-256, SHA-384, and SHA-512 only - MD5 isn't part of the browser's Web Crypto API and isn't generated here.

Problem

Pasting a downloaded file's raw bytes into the text box to verify its checksum

Solution

This tool hashes the text you type or paste, not a file's actual bytes - for anything beyond plain text, pasting through a textarea can silently change the data (encoding, line-ending conversion), producing a hash that won't match the file's real, published checksum.

Problem

Assuming a matching SHA-256 hash means the text is safe or trusted

Solution

A hash confirms two pieces of text are identical - it says nothing about whether the content itself is safe, correct, or from a trusted source.

Problem

Using one of these hashes to store a password

Solution

SHA-1 through SHA-512 are all fast, general-purpose hash functions - fast is the opposite of what password storage needs, since it lets an attacker try billions of guesses per second against a stolen hash. Password storage calls for a slow, purpose-built algorithm like bcrypt or Argon2, not a raw SHA hash.

Tips & Best Practices

Use SHA-256 as the default unless something specific requires otherwise

SHA-256 is the current general-purpose standard - reach for SHA-1 only when required for compatibility with an existing system, and SHA-384/SHA-512 when you specifically want a longer digest.

Compare hashes with a copy-paste, not by eye

Hex hashes are long enough that visually scanning for a mismatch is unreliable - copy both values out and compare them programmatically or with your editor's diff view instead.

For real file-checksum verification, use a CLI tool instead

Since this tool only hashes text you paste in, verifying a downloaded file's official checksum is more reliable with a command like sha256sum (Linux/macOS) or Get-FileHash (Windows PowerShell), which reads the file's actual bytes directly.

Limitations

No MD5

Only SHA-1, SHA-256, SHA-384, and SHA-512 are generated - MD5 isn't available, since it isn't part of the Web Crypto API this tool relies on.

Text input only - no file upload

There's no way to upload a file directly; you can only hash text typed or pasted into the box, which makes this unsuitable for verifying a binary file's checksum.

No HMAC support

The tool computes plain hash digests only - there's no option to provide a secret key for HMAC (keyed-hash message authentication), so it can't generate or verify HMAC signatures.

No password-hashing algorithm

bcrypt, scrypt, and Argon2 aren't available here - this tool only produces fast, general-purpose SHA digests, which are unsuitable for password storage regardless of which of the four algorithms you pick.

Comparisons

SHA-1 vs SHA-256

Both are supported here, but they're not interchangeable - SHA-1 has known collision weaknesses that make it unsuitable for anything security-sensitive, while SHA-256 is the current general-purpose standard.

SHA-1SHA-256
Output length160 bits (40 hex characters)256 bits (64 hex characters)
Security statusBroken for security use - practical collision attacks existCurrent standard - no practical collision attack known
Typical use todayLegacy system compatibility, non-security checksumsGeneral-purpose hashing, integrity checks, most new systems

Which should you use?

Use SHA-256 by default. SHA-1 is included for compatibility with systems that still expect it, not because it's a good choice for anything new - its known weaknesses mean it shouldn't be relied on wherever collision resistance actually matters.

FAQs

The most common question is whether a hash can be reversed. Hashing is one-way by design - there is no algorithm to recover the original text from the hash. What attackers use instead are rainbow tables: precomputed hash-to-text dictionaries for common passwords.

Is the hash generated on my device or sent to a server?

All hashing is done entirely in your browser using the Web Crypto API. Your text is never sent to any server.

What hashing algorithms does this tool support?

This tool supports SHA-1, SHA-256, SHA-384, and SHA-512 - the algorithms natively available in the browser's Web Crypto API.

Can I use this to verify file checksums?

You can hash any text string. For file checksums, paste the file contents as text, though very large files may be slow.

Get more tools like this

Leave your email so we can prioritize similar tools and updates.

Trending Tools

Trending tools will appear as visitors explore the catalog.

Recently Used

Your recently visited tools will show up here.