What is a hash function?

DefinitionA hash function is an algorithm that converts data of any size into a fixed-size value, called a hash, so that the same input always produces the same output.

Also known as Hash algorithm

Hash functions are used to look up data quickly in hash tables, check files for corruption and detect duplicate content. Cryptographic hash functions such as SHA-256 add stronger guarantees: it's practically impossible to work backward from a hash to the input or to find two inputs with the same hash, which makes them useful for digital signatures, TLS certificates and verifying downloads.

On the web, hashing also helps protect privacy. Some analytics tools, such as Fathom Analytics, combine details like a visitor's IP address and browser with a regularly changing salt and hash them, so they can count unique visitors without storing identifying data. Passwords should be stored with slow, salted hashing algorithms designed for that purpose, because fast or unsalted hashes can be cracked with precomputed rainbow tables.

Hash function resources

Topic: Privacy and security

Cite this definition
APA

What is a hash function? (2026, November 22). Glossary. https://glossary.io/hash-function/

MLA

“What Is a Hash Function?” Glossary, Coywolf, 22 Nov. 2026, glossary.io/hash-function/.

Chicago

“What Is a Hash Function?” Glossary. Coywolf. November 22, 2026. https://glossary.io/hash-function/.

HTML link
<a href="https://glossary.io/hash-function/">What is a hash function?</a>

Published