Skip to content

Hash Generator

Generate MD5, SHA-1, SHA-256, and SHA-512 hashes of text.

Last updated August 26, 2026

Encoding

MD5

—

SHA-1

—

SHA-256

—

SHA-512

—

About this tool

A hash function takes input of any size and produces a fixed-length fingerprint, used to verify data integrity, detect duplicates, or (for stronger algorithms) store passwords. This tool generates MD5, SHA-1, SHA-256, and SHA-512 hashes. MD5 and SHA-1 are fast but cryptographically broken — fine for checksums, but never for security-sensitive use. SHA-256 and SHA-512 are the current standard for anything security-related.

Hash algorithm comparison

AlgorithmOutput sizeStill safe for security?
MD5128 bitsNo — checksums/dedup only
SHA-1160 bitsNo — deprecated for security use
SHA-256256 bitsYes
SHA-512512 bitsYes

Code examples

The second line (where shown) is the inverse operation.

LanguageCode
JavaScriptawait crypto.subtle.digest('SHA-256', data)
Pythonhashlib.sha256(b'text').hexdigest()
PHPhash('sha256', 'text')
Shellecho -n 'text' | sha256sum

Frequently asked questions

Should I use this to hash passwords?

No. General-purpose hash functions like SHA-256 are too fast, making them vulnerable to brute-force attacks on passwords. Use a password-specific algorithm like bcrypt, scrypt, or Argon2 instead.

Why does the same input always produce the same hash?

Hash functions are deterministic by design — that's what makes them useful for verifying that data hasn't changed.

Is my input sent anywhere to compute the hash?

No — all hashing runs locally in your browser using the Web Crypto API (for SHA) or a JS implementation (for MD5).

Do I need a unique ID instead of a hash?

A hash fingerprints existing data. To generate a new identifier, use the UUID Generator for UUID v4 or time-ordered UUID v7 values.