Hashing

What is Hashing? Algorithms, Uses, and How It Works

An educational guide explaining what hashing is, how hash functions work, the most common algorithms (MD5, SHA-256, bcrypt), and their role in data integrity, passwords, and blockchain.

Hashing is one of the most important concepts in computer science and cryptography. It underpins password security, file integrity checks, digital signatures, and blockchain technology. Here's everything you need to know.

What is a Hash Function?

A hash function takes an input of any size and produces a fixed-size output called a hash, digest, or checksum. The same input always produces the same output, but even a tiny change in the input produces a completely different hash — this is called the avalanche effect.

Example: The SHA-256 hash of "hello" is always 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.

Key Properties of Cryptographic Hash Functions

  • Deterministic: Same input always gives the same output.
  • Fast to compute: Hashing is designed to be quick.
  • One-way: You cannot reverse a hash to get the original input.
  • Avalanche effect: A tiny change in input changes the hash completely.
  • Collision resistant: It should be computationally infeasible to find two inputs with the same hash.

Common Hash Algorithms

MD5

MD5 produces a 128-bit (32 hex character) hash. Once widely used for passwords, MD5 is now considered cryptographically broken due to collision vulnerabilities. Still useful for non-security checksums.

Try it: MD5 Hash Generator

SHA-1

SHA-1 produces a 160-bit (40 hex character) hash. Also deprecated for security purposes but still in use in some legacy systems and Git's object model.

Try it: SHA-1 Hash Generator

SHA-256

Part of the SHA-2 family, SHA-256 produces a 256-bit (64 hex character) hash. This is the current industry standard for most cryptographic applications including Bitcoin, SSL/TLS, and code signing.

Try it: SHA-256 Hash Generator

SHA-512

SHA-512 produces a 512-bit (128 hex character) hash. Stronger than SHA-256, useful for applications requiring extra collision resistance.

Try it: SHA-512 Hash Generator

CRC32

CRC32 is not a cryptographic hash — it's a checksum algorithm designed for error detection in data transmission. Fast and compact, but not suitable for security purposes.

Try it: CRC32 Checksum

What is Hashing Used For?

  • Password storage: Passwords are hashed (with a salt) before storing. When you log in, your input is hashed and compared.
  • File integrity: Hash a file before and after transfer to verify it wasn't corrupted or tampered with.
  • Digital signatures: Sign a hash of a document rather than the document itself.
  • Blockchain: Bitcoin uses SHA-256 to chain blocks together.
  • Data deduplication: Hash files to find duplicates without comparing byte-by-byte.

How to Identify an Unknown Hash

Not sure what algorithm produced a hash you're looking at? Use the Hash Identifier tool — it analyzes the length and character set to determine the most likely algorithm.

Explore all hashing tools free at NumbersChecker Hashing Tools.