10.71K viewsEthereum

Are ethereum addresses actually case sensitive? I noticed that both lower case and upper case version of eth address works quite well, does it really matter?

Answered question

No, they are not case-sensitive. Ethereum addresses are displayed in HEX, ( hexadecimal, 0-9 & A-F ). Capital “A” would essentially mean the same as lower case “a”. The capitalization is meant for the purpose of optional checksum. The Checksum mechanism is encoded in the address variation that consists capitalization. It is impossible to check the validity of a particular address if it only contains letters in lowercase. However, either variation will work fine as an address. As a matter of fact, you could even randomly capitalize or lower-case the letters and it will still work just fine! ( But don’t capitalize the prefix “0x”)

In case you are interested, this is how the checksum works:

  1. Start with the lowercase address and the prefix 0x is removed.
  2. sha3 hash the string of letters
  3. change the capitalization of the address letter corresponding to the nth letter of the hash following the rule below

0/1/2/3/4/5/6/7 → Lowercase
8/9/a/b/c/d/e/f → Uppercase

Basically, you sha3 hash your original address with 0x removed, and examine each Nth character of the sha3 hash result. If the Nth character is from 0-7, the corresponding Nth character in your address is in lowercase. On the other hand, if the Nth character is from 8-9 or a-f, the corresponding Nth character in your address is in uppercase.

Here’s the link to the code and implementation.

Edited answer
You are viewing 1 out of 2 answers, click here to view all answers.