What a Hash Function Actually Does
A hash function takes any input — a word, a file, an entire document — and produces a fixed-length string of characters (the hash) that's effectively unique to that exact input, is practically impossible to reverse back into the original input, and changes completely even if just one character of the input changes, which is what makes hashes useful for verifying that something hasn't been altered, without needing to store or compare the original content directly.
This combination of properties — one-way, fixed-length, and extremely sensitive to small changes — is what separates a proper hash function from simple encoding or compression.
Why it's effectively one-way
A well-designed hash function is deliberately built so there's no practical way to work backward from the hash to recover the original input — unlike encoding (like Base64), which is fully and easily reversible, a hash intentionally discards the information needed to reconstruct the input, keeping only a fixed-size fingerprint of it.
Why tiny input changes produce a completely different hash
This property, often called the avalanche effect, means changing even a single character anywhere in the input produces a hash that looks completely unrelated to the original — this is intentional, and exactly what makes a hash useful for detecting even the smallest unauthorized change to a file or piece of text.