# How to check if an address owns an NFT (ERC721)?

**URL:** <https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678>\
**Category:** Contracts\
**Created:** [April 16, 2020, 6:39pm UTC](https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678 "2020-04-16T18:39:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![x5engine](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/x5engine/32/1834_2.png) [@x5engine](https://forum.openzeppelin.com/u/x5engine)\
**Post date:** [April 16, 2020, 6:39pm UTC](https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678/1 "2020-04-16T18:39:39Z")

</div>

So I have an ERC721 Contract when I mint NFTs then let users clone them but then they get added to the list of tokens, now I need to know if the current user/address owns this NFT? thanks

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [April 17, 2020, 12:56am UTC](https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678/2 "2020-04-17T00:56:09Z")

</div>

Hi @x5engine,

I assume you are doing this off chain.

First you can check if the address hold any of the token by checking the addresses balance using [`balanceOf`](https://docs.openzeppelin.com/contracts/3.x-rc/api/token/erc721#ERC721-balanceOf-address-)

You can then loop through the tokens held by the address to get the tokenID using [`tokenOfOwnerByIndex`](https://docs.openzeppelin.com/contracts/3.x-rc/api/token/erc721#ERC721-tokenOfOwnerByIndex-address-uint256-)

---

<div class="post-metadata">

**Author:** ![x5engine](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/x5engine/32/1834_2.png) [@x5engine](https://forum.openzeppelin.com/u/x5engine)\
**Post date:** [April 17, 2020, 1:21am UTC](https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678/3 "2020-04-17T01:21:36Z")

</div>

yes that’s a nice way and i know that but what if the user owns a lot of cloned NFTs? I will have to loop over all of them to find it? for only this tokenid?

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [April 17, 2020, 1:47am UTC](https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678/4 "2020-04-17T01:47:26Z")

</div>

Hi @x5engine,

I am not sure what you mean by cloned NFTs?

Can you describe your use case a bit more if possible?

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 1, 2021, 1:12am UTC](https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678/5 "2021-03-01T01:12:02Z")

</div>

Split this topic on March 1, 2021, 1:12am UTC

A post was split to a new topic: [tokenOfOwnerByIndex is undefined](https://forum.openzeppelin.com/t/tokenofownerbyindex-is-undefined/6016)

---

<div class="post-metadata">

**Author:** ![Juan\_David\_Pena\_Melo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/juan_david_pena_melo/32/5265_2.png) [@Juan\_David\_Pena\_Melo](https://forum.openzeppelin.com/u/Juan_David_Pena_Melo)\
**Post date:** [April 30, 2021, 2:12am UTC](https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678/6 "2021-04-30T02:12:52Z")

</div>

Hello, I wonder if can check if an address has an ERC721 token from another contract ERC721?  
sorry if open a thread but I can’t find anything on the internet

similar to address.balance = amount of ether

address.erc721 exists?

---

<div class="post-metadata">

**Author:** ![kally](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@kally](https://forum.openzeppelin.com/u/kally)\
**Post date:** [October 30, 2021, 7:54pm UTC](https://forum.openzeppelin.com/t/how-to-check-if-an-address-owns-an-nft-erc721/2678/7 "2021-10-30T19:54:03Z")

</div>

hello. i'm looking to solve a similar issue. did you get any solutions please?.
