Security
Hashing
Hashing converts data of any size into a fixed-length fingerprint using a one-way function, so the same input always produces the same output but the output cannot be reversed.
Updated 12 Aug 2026
A one-way fingerprint
A hash function reads any amount of data and emits a fixed-length value. The same input always yields the same hash, a tiny change to the input produces a completely different hash, and there is no practical way to work backwards from the hash to the original data.
Hashing, encryption and encoding
| Reversible? | Needs a key? | Purpose | |
|---|---|---|---|
| Encoding (Base64) | Yes | No | Transport binary as text |
| Encryption (AES) | Yes, with the key | Yes | Confidentiality |
| Hashing (SHA-256) | No | No | Integrity and verification |
Two different jobs
Integrity hashing wants speed: SHA-256 verifies a downloaded file or detects that a document changed. Password hashing wants the opposite — deliberately slow, memory-hard functions such as bcrypt, scrypt or Argon2, each with a unique random salt, so an attacker who steals the database cannot test billions of guesses per second.
MD5 and SHA-1 are broken for security purposes: collisions can be produced deliberately. Never use them for signatures, certificates or passwords.
Text Diff
When a hash says two files differ, the Text Diff shows you exactly where.
Characteristics
- Fixed-length output regardless of input size
- Deterministic — identical input always gives identical output
- Avalanche effect: one changed bit rewrites the whole hash
- One-way by design, with no key involved
Common uses
- Verifying file downloads and detecting corruption
- Storing passwords safely with a salt and a slow algorithm
- Content addressing in Git commits and caches
- Deduplicating files and building integrity checks
Advantages
- Cheap and fast integrity checking of arbitrary data
- Protects stored passwords even if the database leaks
- Fixed-size output is convenient as a key or index
- No key management burden
Limitations
- Cannot recover the original data — by design
- Fast hashes are unsuitable for passwords
- Legacy algorithms are collision-prone and must be retired
- Unsalted hashes fall quickly to rainbow tables
Examples
sha256("ToolSera") -> 5f8c1a... (64 hex characters)
sha256("Toolsera") -> b2e7d4... (completely different)Frequently asked questions
What is hashing used for?
Verifying integrity, storing passwords, deduplicating content and addressing data by its fingerprint.
What is the difference between hashing and encryption?
Encryption is reversible with a key; hashing is one-way and has no key.
Why do passwords need a salt?
A unique salt per password stops attackers reusing precomputed tables across accounts.
Is MD5 safe to use?
Not for security. It is acceptable only for non-adversarial checks such as cache keys.
Can two inputs share a hash?
Yes, that is a collision. Strong modern algorithms make finding one computationally infeasible.
Related terms
JWT
A JSON Web Token (JWT) is a compact, signed token that carries JSON claims about a user or client so a server can verify identity without a database lookup.
Base64
Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters so it can travel safely through text-only channels.
Character Encoding
Character encoding is the mapping between the characters people read and the bytes computers store, defining how text is turned into binary and back again.
UUID
A UUID is a 128-bit identifier, written as 36 hexadecimal characters, designed to be unique without any central coordination between the systems that generate it.
JSON
JSON is a lightweight text-based data format commonly used to exchange structured data between applications and APIs.
SQL
SQL (Structured Query Language) is the standard language for defining, querying and modifying data held in relational databases.
Related tools
Related guides
Why Won't My PDF Unlock? (Password Types Explained)
Why a PDF opens in a viewer but still fails merge or unlock: Password to open vs Owner / permissions lock vs None. What Unlock PDF can remove (RC4, AES-128, AES-256) — and what it cannot (lost passwords, certificate encryption, rare /V3).
Base64 Explained: What It Is and When to Use It
How Base64 turns binary into text, why output is about 33% larger, where padding comes from, URL-safe variants, and why Base64 is encoding rather than encryption.
Why Does Compressing an Image Make It Bigger?
When image compression increases file size: re-encoding optimized JPEGs, PNG for photos, quality/format mismatches, and Max quality with no downsampling. How Image Compressor warns instead of faking a win — and what to try next.
URL Encoding Explained (Percent-Encoding)
Why URLs need encoding, which characters are reserved, the difference between encodeURI and encodeURIComponent, plus and space confusion, and how to avoid double encoding.