Hash
In simple terms
A hash is like a digital fingerprint for data. When you feed any information into a special mathematical formula, it creates a unique code that represents that data—change even one tiny detail, and the entire fingerprint changes.
Definition
A unique string of characters generated by a cryptographic function, used to secure data on the blockchain.
In depth
A hash is the fixed-length output produced by a cryptographic hash function when processing input data of any size. These functions are deterministic (same input always produces the same hash), avalanche-prone (tiny input changes produce completely different hashes), and computationally one-way (nearly impossible to reverse-engineer the original data from the hash). In blockchain systems, hashes secure transaction integrity and link blocks together chronologically, allowing validators to detect any tampering with historical data.
How does Hash work?
A hash function takes any input, whether a file, a message, or a whole block of transactions, and produces a fixed-length string of characters. Bitcoin uses SHA-256, which always returns 256 bits regardless of input size. The same input always yields the same output, changing a single character produces a completely different result, and there is no practical way to work backward from output to input. Blockchains rely on this in several places: each block header contains the previous block's hash, which is what chains them together, and transactions are summarized into one hash through a Merkle tree.
An example
Hashing the text hello with SHA-256 gives a 64-character result beginning 2cf24dba. Hashing Hello, with one letter capitalized, gives a completely unrelated result beginning 185f8db3. This is why blockchains are tamper-evident: altering one transaction inside an old block changes that block's hash, which breaks the link stored in the next block, so every block after it would have to be recomputed too.
Figures are illustrative only.
What beginners get wrong
- Confusing hashing with encryption, when encryption is designed to be reversed using a key and a hash cannot be turned back into its input.
- Reading a transaction hash as a wallet address, since the two look similar but identify entirely different things and funds sent wrongly are lost.
- A matching hash proves only that data is unchanged; it says nothing about who created that data or whether the contents are trustworthy.
- Treating a network's hash rate as a price signal, when it measures computing power committed to mining rather than anything about value.
Related terms
Part of
What is cryptocurrency, and how does it work? — the subject page for cryptocurrency basics, with all 23 of its definitions in one place.
Educational only — not financial advice.
