Woman in a blue shirt using a laptop

What is a hash function? How SHA-256 keeps blockchains honest

By SendPay Business · · 2 min read

Your numbers, worked out
  1. Type in your own numbers
  2. The tool works it out
  3. See the answer clearly

A hash function takes any input, from one letter to a whole file, and turns it into a short fixed-length string called a hash. Good hash functions are one of the building blocks of blockchains, passwords and secure payments.

What makes a good hash

Tap to explore

Tap each one to see what it means.

Same input, same hash, every time.
Fixed length

SHA-256 always gives 256 bits, written as 64 hexadecimal characters.

One way

you can't work out the input from the hash.

Avalanche effect

change one character and the hash changes completely.

Collision resistant

it is practically impossible to find two inputs with the same hash.

Woman in a grey jumper using a laptop

How Bitcoin uses SHA-256

Each Bitcoin block includes the hash of the block before it, chaining them together, so changing an old block would change every later hash and be spotted. Miners hash block headers over and over, changing a number each time, until they find a hash below the network's target. That work is the proof in proof of work.

Try it

Name your platform and watch it come to life

Type a name, tap a colour and pick what it does. The phone changes as you go.

Colour

What it does

Build mine

Design and preview your whole platform free, then launch when you are ready.

Other everyday uses

Websites store hashes of passwords rather than the passwords themselves. Software downloads publish hashes so you can check a file hasn't been altered. Transaction IDs on blockchains are hashes of the transaction data.

Smiling man in a suit in a modern office

Hashing is not encryption

Encryption is designed to be reversed by whoever has the key. Hashing is designed never to be reversed. That's why a hash can prove data hasn't changed without revealing the data itself.

Where SendPay fits

SendPay platforms let customers buy, sell and hold crypto, held with regulated partners, alongside GBP, EUR and USD accounts, powered by licensed partners. SendPay doesn't offer trading tools, DeFi or lending.

Woman seated, using a laptop

How it works

Your own money app
  1. Name it and pick your colours
  2. Choose what it does
  3. Launch when you are ready

Why sign up

Create your free SendPay account

It's all about creating your own financial platform with ease. Start with a free account today.

  • A free business accountOpen it in about a minute with your business name, email, password and mobile. No card and no documents to start.
  • Get paid from day oneTake card payments, and share your own payment link and invoices so customers pay in a click.
  • A free business websiteFree to build, free to publish and free to keep, with unlimited visits.
  • Your own financial platformDesign and preview your whole platform free, then launch when you are ready.

SendPay Business is a technology company, not a bank. Accounts, cards and payments are powered by licensed partners.

Questions people ask

Can I try SHA-256 myself?

Type any text into the free generator and see its hash.

SHA-256 hash generator →
What is a blockchain?

A shared record of transactions, chained together by hashes.

What is a blockchain? →
What is hash rate?

How many hashes a mining network tries each second.

Hash rate →
What is crypto mining?

How new blocks are added and new coins issued.

Crypto mining →

Read next

Spotted a mistake or something out of date? and we'll fix it. How our guides are made

This guide is general information, not legal or financial advice. SendPay Business is a technology company, not a bank, and does not take deposits; regulated services on the platforms are provided by licensed partners. Other companies named in this guide are reference points only and are not affiliated with SendPay Business.