I am looking for on-line or off-line run Bitcoin Blockchain Parser to get all block headers only

All I need is

########## Block Header ##########
Version:         1
Previous Hash    00000000000000000000000000000000
Merkle Root    4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
Time             1231006505
Difficulty       1d00ffff
Nonce            2083236893

No transactions data.

1 Answer 1


I share a small Python script that can parse off-line the data which is stored in blk*.dat files.

You can try it here.

If you want, you can turn-off the strings savings that you does not need.

  • Thank you Denis, your Python script looks great and highly professional. Following the last collapse in bitcoin and cryptos I have lost any hope, recovery to ever come, but studying blocks in the blockchain still makes me busy and happy. First of all I need to extract nonce for all bloks to let me verify if some services, publishing individual block headers don't cheat us. An old bug was to have any block header generated with nonce preset to "0". Thank you once again. There is an old problem in stackexchange logging in if Bitcoin is your first login site. Email refers to SE and login fails.
    – darius
    Jun 14, 2018 at 17:22
  • @darius what do you mean An old bug was to have any block header generated with nonce preset to "0"? Jun 19, 2018 at 9:34
  • read this thread bitcoin.stackexchange.com/questions/66878/… I checked now blockcypher.com/dev/bitcoin/?shell#block and it looks like nonce = 0 bug has gone
    – darius
    Jun 20, 2018 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.