When I am running through an example for Sha256 I am not understanding how to arrive at the right answer. If I use the following Hex string:


and run this through sha256, I get the following:


However, if I go the website: https://anyhash.com/sha256?hello and run the same example through sha256, but with the Hex checkbox ticked off, I get the expected result I am looking for:


Can someone explain to me what it is doing when I check off that Hex checkbox? It would be helpful to know what I am transforming the Hex string into in order to run it through sha256 without having to check hex box.

1 Answer 1


When that "hex" check box is ticked, it tells the website to interpret the hex string that you entered as representing hexadecimal bytes, i.e. binary data. Normally when you just hash that hex string, it is interpreted as a string, i.e. a sequence of characters. But you really want to hash the binary data that that string represents, and that is what that hex checkbox lets you do.

  • How does that interpretation work? If I was writing my own program, the pseudo code would be: Find Hex string -> convert to binary form -> sha256? Does this mean that if I enter the binary format in that site, without checking that box, it should provide the same answer?
    – ghawes
    Jan 5, 2018 at 0:04
  • It's not just convert to binary form but rather parse the hex string as representing bytes. The string itself has a binary form, but that form is different from the binary that the string represents. Once you have parsed the string, then you hash that data. If you were to represent the binary form as human readable text, that text would be a string that is half as long and usually filled with junk characters unless the hex string specifically represented data that corresponds to human readable text. If you entered the text that you got into a hasher, then you would get the correct result.
    – Ava Chow
    Jan 5, 2018 at 0:24
  • I don't know why this took me so long to understand, but after rereading your comment a few times, I finally get it. Thank you!
    – ghawes
    Jan 5, 2018 at 6:27

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.