---
title: "HASH256"
description: "SHA-256 twice. Bitcoin transaction ids and block hashes and the Base58Check checksum"
canonical_url: "https://hashes.agntn.dev/algorithms/hash256"
---
# HASH256

> SHA-256 twice. Bitcoin transaction ids and block hashes and the Base58Check checksum

<algorithm-facts name="hash256">



</algorithm-facts>

SHA-256 of SHA-256. Bitcoin's txids, block hashes, merkle nodes, and the 4-byte checksum at the end of every Base58Check string.

```ts
create("hash256").hash("hello").digest;
// "9595c9df90075148eb06860365df33584b75bff782a510c6cd4883a419833d50"
create("sha256").hash(create("sha256").hash("hello", { encoding: "binary" }).digest).digest;
// the same, spelled out
```

The digest comes out in hash order. Block explorers print txids and block hashes byte-reversed, so compare against a reversed string or reverse the bytes first. Everybody trips over this once. No HMAC mode.


## Sitemap

See the full [sitemap](https://hashes.agntn.dev/sitemap.md) for all pages.
