6

I have an error from web3:

Unhandled rejection Error: Given address "0x" is not a valid Ethereum address.

My question is if is there any tool that can fix my address (add checksum).

  • Looks like you're trying to pass an illegal address, without any trailing zeros. Are you trying to send to the zero address (0x0) ? – jojeyh Oct 15 '17 at 21:21
  • No I found out that etherscan.io is formatting address in correct form with checksum, but I still have warning from web3. – gkucmierz Oct 15 '17 at 21:25
  • Here is an online tool for you tokenmarket.net/ethereum-address-validator – Mikko Ohtamaa Mar 15 '18 at 8:45
8

If you prefer a simple web version, check out EthSum:

EthSum Screen Capture

Disclaimer: I'm the author, it's an open source tool.

| improve this answer | |
  • 1
    Top notch tool, I use it all the time. But please update after an address has been checksummed to say, "this address has been checksummed" rather than "this address had already been checksummed." It was very confusing for a newbie like me. – Nik Loladze Apr 7 at 11:04
  • Thanks Nic, happy that you like it! Could you clarify your issue, please? There's no "had already been checksummed" message, only "address is already checksummed" when the input address is already in the correct form. Would you rather want to see "address has been checksummed" all the time? – Paul Razvan Berg Apr 7 at 11:42
9

With web3 you can do:

web3.toChecksumAddress('INSERT ADDRESS HERE')

It will return the address with checksum

| improve this answer | |
  • 1
    In a new version of web3 you have to use web3.utils.toChecksumAddress – EtherPaul Jul 16 at 20:05
5

Yes, you can.

Replcae your address in the following url of etherscan https://etherscan.io/address/{address} like this:

you want the checksum for address 0x0fd60495d705f4fb86e1b36be396757689fbe8b3 so you need to call https://etherscan.io/address/0x0fd60495d705f4fb86e1b36be396757689fbe8b3 then copy the address with valid checksum 0x0Fd60495d705F4Fb86e1b36Be396757689FbE8B3 on the loaded page.

enter image description here

| improve this answer | |
4

These are the functions you're looking for: specification of the corresponding EIP and the implementation.

| improve this answer | |
  • Is there an interactive online version anywhere? – Stan James Oct 17 '17 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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