From my knowledge a header hash will be calculated like this:

  1. serialize all header fields, including "the nonce"
  2. hash the serialized header once
  3. hash the hashed serialized header again
  4. check if the result is below the target
  5. if no: choose a different nonce and start over

I'm referring to this site that allows you to enter some header data and calculate the header hash:


The site already calculates the serialized header that I have to use for the hashing process:


So running this serialized header through SHA256 for two times gives me this hash after the first iteration:


And hashing this again would return:


But this is not the actual hash for this block header. Apparently, because starting with a 9 seems not be very difficult. That is the correct header:


So I'm wondering, what additional step I'm missing here?

Thank you

1 Answer 1


The problem is that you are hashing the header as a string, not as the bytes that the hex represents. If you hash it as bytes, you will get the expected hash. Both the header, and the first hash, must be treated as bytes, not a hex string.

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.