India · Dubai · Delivering worldwide+91 86603 71224info@pyalm.com
Pyalm Labs logo
Free Tools

What Is a Hash? MD5, SHA-1 and SHA-256 Explained

A hash turns any input into a fixed-length fingerprint that can't be reversed. Here's what hashing is for, how MD5, SHA-1 and SHA-256 differ, and which you should actually use.

Editorial disclosure: Pyalm publishes and maintains the products and free tools discussed on this site. Regulatory statements are linked to primary sources where applicable. No independent professional review is claimed unless a reviewer is explicitly named.

A hash function takes any input — a word, a file, a gigabyte of data — and produces a fixed-length string of characters called a digest. The same input always gives the same digest, but you can't run it backwards to recover the input. It's a one-way fingerprint.

What hashing is used for

  • Integrity checks. Publish a file's hash, and anyone who downloads it can hash their copy and confirm it matches — proof nothing was corrupted or tampered with in transit.
  • Deduplication and lookups. Identical content produces identical digests, so hashes make handy keys and duplicate detectors.
  • Password storage (with important caveats — see below).

Hashing is not encryption

This trips people up constantly. Encryption is two-way — with the key, you get the original back. Hashing is one-way — there's no key and no "unhash." If a tool claims to decode a hash back to its input, it's really just looking the value up in a precomputed table of common inputs, not reversing the maths.

MD5 vs SHA-1 vs SHA-256

  • MD5 (128-bit) — fast, but cryptographically broken: attackers can craft two different inputs with the same digest (a "collision"). Fine as a non-security checksum, unsafe for anything that must resist tampering.
  • SHA-1 (160-bit) — also broken by practical collision attacks and now deprecated. Avoid for new work.
  • SHA-256 (256-bit, part of the SHA-2 family) — the current sensible default. No practical collisions, widely supported, and used everywhere from TLS certificates to software signing.

The short version: use SHA-256 unless you have a specific reason not to, and treat MD5/SHA-1 as legacy checksums only.

A note on passwords

Plain SHA-256 is too fast for storing passwords — attackers can try billions of guesses per second. Password storage uses deliberately slow, salted algorithms like bcrypt, scrypt, or Argon2 instead. Hashing still matters there; it's just a different, purpose-built kind.

Try it

Generate MD5, SHA-1, and SHA-256 digests for any text with the free Hash Generator — it runs in your browser, so nothing you enter is transmitted.

Hash Generator | Base64 Encoder / Decoder | JWT Decoder | All free tools

Keep reading

More from Pyalm

Nov 27, 2026

Prescription Abbreviations: What OD, BD, TDS, SOS and 1-0-1 Mean

A plain-English list of prescription abbreviations: dose timing (OD, BD, TDS, QID), when to take (AC, PC, HS, SOS), routes, forms, the 1-0-1 dose grid and abbreviations to avoid.

Nov 27, 2026

Handwritten vs Typed Prescriptions: Which Is Safer?

Why legibility matters in prescribing, what changes when clinics move from handwritten to typed or electronic prescriptions, and how to keep a handwritten signature.

Nov 27, 2026

How to Write a Prescription in India: Format and Rules

A practical prescription format for doctors in India: required details, generic names in capitals, the 1-0-1 grid, Schedule H and controlled drugs, and keeping records.

Nov 27, 2026

Prescription Pad Design: Letterhead Template for Clinics

What a professional prescription letterhead should include, paper size, layout, bilingual Arabic and English pads, QR codes for verification and printing tips.

Nov 27, 2026

Prescription Errors: 10 Common Mistakes and How Clinics Prevent Them

The ten prescription mistakes that cause dispensing errors, from illegible names and decimal points to missing durations, and simple fixes for clinics.

Oct 16, 2026

How to Format and Validate JSON (and Fix the 6 Most Common Errors)

Why JSON breaks, how to read a validator's error message, and a quick routine for pretty-printing, minifying and fixing JSON from APIs, logs and config files.

Explore Pyalm Products & Tools

Practical software and technology services from India and Dubai — from websites and automation to WhatsApp, AI identity, and accounting products.

Services Free Tools Products