A hash function in blockchain is a cryptographic algorithm that converts an input (or ‘message’) into a fixed-size string of characters, which is typically a hash value or digest. This function ensures that even a small change in the input results in a significantly different hash, and it is designed to be a one-way process, making it computationally infeasible to reverse-engineer the original input from the hash. Hash functions are essential for maintaining data integrity, securing transactions, and facilitating the creation of digital signatures within blockchain technology.