# Which is the smallest hash that has ever been hashed?

Let's assume, the hash `00000000000000000024c0bdbec66a889778c00bc69be0a96cbbd98b75c3ce09` of block #499644 is smaller than ``` 0000000000000000002d429f39afec70c938e888c3417d690bbc85e83529991c``` of block #499645.

They both have 18 Zeros, then `2=2`, but then `4<d`.

Which is the smallest hash that has ever been hashed during cryptomining? How many zeros? Which block?

The 12 lowest block hashes in Bitcoin as of Jan 22 2023:

• I'd be interested to know how you generated this list, and why you decided to post the lowest 12. Dec 17, 2017 at 4:09
• I run bitcoin.sipa.be and the website data is generated from a text file with a list of all blocks with hash and height. I sorted the file based on hash and posted the top 12, to give an idea of how common the top number of zeroes is. Dec 17, 2017 at 5:59
• The following equation estimates total chain work based on just 1 of the lowest hashes and its rank. Chain_work = (2^256-1) * (N-1) / Nth_smallest_hash. Stdev error =~ 1/SQRT(N). But for the lowest hash N=1, experiment requires replacing the N-1 with 1/12 which has 5,000% stdev err.
– zawy
Dec 12, 2023 at 18:20

Just for fun I made a program to list all record low hashes starting from block 1 ...

Max block count: 773048

``````Block      1 : 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048
Block      2 : 000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd
Block      6 : 000000003031a0e73735690c5a1ff2a4be82553b2a12b776fbd3a215dc8f778d
Block     12 : 0000000027c2488e2510d1acf4369787784fa20ee084c258b58d9fbd43802b5e
Block     16 : 00000000174a25bb399b009cc8deff1c4b3ea84df7e93affaaf60dc3416cc4f5
Block     23 : 000000000cd339982e556dfffa9de94744a4135c53eeef15b7bcc9bdeb9c2182
Block     46 : 0000000002d5f429a2e3a9d9f82b777469696deb64038803c87833aa8ee9c08e
Block    113 : 00000000019176838de40606d70738084f2fbc48a50548eeeac3ceb857677c6d
Block    525 : 00000000015402dc2bcc4afdc3be3c58e873a7ecea22c12f72d6889eb9b9a0b1
Block    598 : 0000000000d16752cf56ebae77a37a8fa1ac8e234336a41622c3b7924a07a644
Block    722 : 000000000033b4ee1cc40f05145b1a3987cca2473589e7e23082996e2fe7c899
Block   1430 : 000000000009606d829b157912edb060c406b519fb2bfcc1078c196b69c67e49
Block  11686 : 00000000000243ab3dd422f82638c9651cfc401ac763b2228f00f6abae334f48
Block  43011 : 000000000000c09b5844620bdec4d533107844efea128a6ec6326dd92f6dc7e6
Block  60040 : 0000000000009f9f9991befc49dc787a190206d1dd32467b687e32157d48c651
Block  61068 : 000000000000177131355902f9a7a9d94d1f57aba9ef4430bb01123190325977
Block  89665 : 0000000000000062864d8512b92b2f6a0c2a9edcda82aae03063879b3869d507
Block  91940 : 000000000000004fa1186f88c245f89757b74b7ef1fa87302ab340b635686c1c
Block 114335 : 0000000000000006acb7899a26faa6290030e25ae41c8b3f62d69809994b89d8
Block 206712 : 00000000000000000ae2dba9951e28a3e6308ac7e9e8536104c503aa772c848f
Block 239572 : 000000000000000006582fa9652895fda92c757ae6beee9dfbc3932125b5ab8e
Block 244583 : 000000000000000004ae693a1a8e740a33dd996c27ccc64217ed647e0b90d910
Block 258283 : 0000000000000000004bb6e7e2661661ba9809062d90c3121933d6d02c8bd763
Block 266381 : 000000000000000000028c32e6952731326747bae4be8db0f832d6eea0362050
Block 313338 : 00000000000000000000b7de9e5c19e52be073156924b7cf235efb27ae8a202a
Block 326055 : 000000000000000000007e1166d92acf81d4e2d95934fcdec1276b09a7db9390
Block 331908 : 000000000000000000006836c4009ab00485cd1de4d5958ca7839184d0b80067
Block 334261 : 000000000000000000002d414bb8f9175ba6c6563721e1ba2c1373c2bd94f29f
Block 368527 : 00000000000000000000013712632da34788a7b4ae2cd78f7982c7036610126b
Block 515910 : 0000000000000000000000ab789f6d71d9642ae3f697975ccd00afcb98fe6bd2
Block 585774 : 000000000000000000000019b43763eb4519f4fe65eae9be90fe73117b89026d
Block 634842 : 000000000000000000000003681c2df35533c9578fb6aace040b0dfe0d446413
Block 742035 : 000000000000000000000000fcb36c64b8a99acde151e61c933c6f7a57271db3
Block 756951 : 0000000000000000000000005d6f06154c8685146aa7bc3dc9843876c9cefd0f
``````
• Is the source to your program available? Mar 31, 2021 at 10:05
• sure, it's here. github.com/Johanpmeert/LowBlockHashLister But it uses my own java library to do rpc calls to a local node. That's also on github under JpmBitcoinRpcClient. Apr 1, 2021 at 12:10
• You should add dates to when the blocks were mined to this list :) Feb 9 at 16:16

I don't think there is a site that will show you this information, but it is fairly trivial to find out.

Here's an old Bitcointalk thread that discusses this: https://bitcointalk.org/index.php?topic=29675.0

Here's a python script that will calculate it for you. You will need a bitcoind for it to connect to:

``````from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import binascii
import struct

def uint256_to_str(u):
rs = b""
for i in range(8):
rs += struct.pack("<I", u & 0xFFFFFFFF)
u >>= 32
return binascii.hexlify(rs)

def uint256_from_str(s):
s = binascii.unhexlify(s)
r = 0
t = struct.unpack("<IIIIIIII", s[:32])
for i in range(8):
r += t[i] << (i * 32)
return r

def byteswap(a):
return "".join(reversed([a[i:i+2] for i in range(0, len(a), 2)]))

# rpc_user and rpc_password are set in the bitcoin.conf file
rpc_user = "user"

best_hash = uint256_from_str("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
best_height = 0
counter = 0

while True:
try:
commands = [ [ "getblockhash", height] for height in range(counter, counter + 10000) ]
block_hashes = rpc_connection.batch_(commands)

for block_hash in block_hashes:
block_uint256 =  uint256_from_str(byteswap(block_hash))
if block_uint256 < best_hash:
best_hash = block_uint256
best_height = counter
counter += 1

print("Processed " + str(counter) + " blocks")
except Exception as e:
print(e)
break;

print("Lowest Block Hash: " + byteswap(uint256_to_str(best_hash).decode()) + " at block height " + str(best_height))
``````

This script gave me the following output:

``````Lowest Block Hash: 00000000000000000000011246f099d94f91628d71c9d75ad2f9a06e2beb7e92 at block height 458091
``````

As an alternative to syncing a full Bitcoin node, there is a BigQuery public dataset for Bitcoin (and some other cryptocurrencies):

``````SELECT
`number`,
`hash`
FROM
`bigquery-public-data.crypto_bitcoin.blocks`
ORDER BY
`hash`
LIMIT
10
``````

Results in JSON:

``````[
{
"number": "634842",
"hash": "000000000000000000000003681c2df35533c9578fb6aace040b0dfe0d446413"
},
{
"number": "585774",
"hash": "000000000000000000000019b43763eb4519f4fe65eae9be90fe73117b89026d"
},
{
"number": "675600",
"hash": "00000000000000000000001a9bf725a1f7d019440a04f39706c083751b62974d"
},
{
"number": "658771",
"hash": "00000000000000000000001e9590a06c8452a3ce553834b2bab3daebf62f8b79"
},
{
"number": "679468",
"hash": "0000000000000000000000250fae6b97e3241d86c65fb5be489875c49032b25b"
},
{
"number": "679848",
"hash": "00000000000000000000002d142973ed07a220bf571360b70b90f4f0a1e739ce"
},
{
"number": "625857",
"hash": "000000000000000000000030f8cf8e0a76db53525aff8d56dcfdf4c74fc7878c"
},
{
"number": "622050",
},
{
"number": "664602",
},
{
"number": "696345",
"hash": "00000000000000000000003c5c9269d93153a4eb8fabef76318d849a2ec2b29e"
}
]
``````

I improved on this to print the lowest 50 block hashes as well as their heights and the dates they were generated:

``````from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import datetime

# rpc_user and rpc_password are set in the bitcoin.conf file
rpc_user = "user"
rpc_connection = AuthServiceProxy("http://%s:%[email protected]:8332" %

block_cnt = rpc_connection.getblockcount()
block_hashes = []

for n in range(0, block_cnt, 1000):
commands = [["getblockhash", h] for h in range(n, min(n+1000, block_cnt))]
block_hashes += rpc_connection.batch_(commands)

block_hashes.sort()

commands = [["getblock", block_hash] for block_hash in block_hashes[0:50]]
blocks = rpc_connection.batch_(commands)

for block in blocks:
time = datetime.datetime.fromtimestamp(block['time']).strftime('%Y-%m-%d')
print(block['hash'], block['height'], time)
``````

A new record was just set yesterday!

``````0000000000000000000000bb5b432a764ad6c7acf677dcd99161abfdf68e698e 500174 2017-12-19
``````