Hash Generator

Generate cryptographic hash values from any text input. Supports MD5, SHA-1, SHA-256, SHA-384, and SHA-512.

Input Text 0 characters
MD5 (insecure)
SHA-1 (insecure)
SHA-256
SHA-384
SHA-512

What Is a Hash Function?

A cryptographic hash function is a mathematical algorithm that takes input data of arbitrary size and produces a fixed-size output called a hash, digest, or checksum. Hash functions are designed to be deterministic (the same input always produces the same output), fast to compute, and practically impossible to reverse. Even a single-character change in the input produces a completely different hash — a property known as the avalanche effect.

Hash functions are fundamental to modern computing and security. They are used in password storage, digital signatures, data integrity verification, blockchain technology, file deduplication, and many other applications.

Supported Hash Algorithms

MD5 (128-bit)

Developed by Ronald Rivest in 1991, MD5 produces a 128-bit (32 hex character) hash. While once widely used, MD5 is now considered cryptographically broken due to demonstrated collision attacks. It should not be used for security-sensitive applications. However, it remains useful for checksums, cache keys, and non-cryptographic fingerprinting.

SHA-1 (160-bit)

Published by NIST in 1995, SHA-1 produces a 160-bit (40 hex character) hash. In 2017, Google demonstrated a practical collision attack (SHAttered), and SHA-1 is now considered insecure for cryptographic use. Major browsers and certificate authorities have deprecated SHA-1 for SSL/TLS certificates.

SHA-256 (256-bit)

Part of the SHA-2 family designed by the NSA and published by NIST in 2001. SHA-256 produces a 256-bit (64 hex character) hash. It is widely used in security applications, blockchain (Bitcoin uses SHA-256), digital certificates, and password hashing. No practical attacks have been found against SHA-256.

SHA-384 (384-bit)

Also part of the SHA-2 family, SHA-384 is a truncated version of SHA-512. It produces a 384-bit (96 hex character) hash and provides a higher security margin than SHA-256. It is commonly used in government and financial applications requiring stronger security guarantees.

SHA-512 (512-bit)

The largest member of the SHA-2 family commonly used. SHA-512 produces a 512-bit (128 hex character) hash. On 64-bit processors, SHA-512 can actually be faster than SHA-256 because it processes data in 64-bit words. It is preferred when maximum hash security is needed.

Hash Function Properties

Common Uses of Hash Functions

Frequently Asked Questions

What is a hash function?

A hash function converts input data of any size into a fixed-size output. The same input always produces the same output, but even a tiny change produces a completely different hash. Hash functions are one-way — you cannot reverse a hash to find the original input.

Which hash algorithm should I use?

For security purposes, use SHA-256 or SHA-512. MD5 and SHA-1 are cryptographically broken and should only be used for non-security purposes like checksums or cache keys. SHA-256 is the most widely used secure hash algorithm today.

Is MD5 still safe to use?

MD5 is not safe for cryptographic purposes because collision attacks have been demonstrated. It remains acceptable for non-security uses like file checksums and data deduplication where collision resistance is not critical.

Related Tools