> For the complete documentation index, see [llms.txt](https://jungle-toolkit.gitbook.io/evm-xcm-jungle-toolkit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jungle-toolkit.gitbook.io/evm-xcm-jungle-toolkit/build-an-evm+substrate-wallet-compatible-architecture-in-your-dapp/the-evm-address-standard/get-an-address-for-a-signer/check-the-validity-of-the-address.md).

# Check the validity of the address

In this section we'll check the validity of an EVM address using ethers

## Check the validity of an EVM address using ethers.js

```javascript
const { ethers } = require('ethers');

// Specify an Ethereum address to test.
const ethereumAddressToTest = 'testAddy';

// Function to check the validity of an Ethereum address.
const isValidEthereumAddress = (address) => {
  try {
    // Ensure the address is in a valid format.
    const validAddress = ethers.utils.getAddress(address);

    // Check if the formatted address is equal to the original address.
    if (validAddress.toLowerCase() === address.toLowerCase()) {
      return true;
    } else {
      return false;
    }
  } catch (error) {
    return false;
  }
};

// Call the function to check the validity of the specified Ethereum address.
const isValidEthAddress = isValidEthereumAddress(ethereumAddressToTest);

// Output the result.
console.log(`Is this Ethereum address valid? ${isValidEthAddress}`);

```
