<p>Related question was asked at <a href="https://bitcoin.stackexchange.com/questions/12746/can-a-bitcoin-transaction-have-the-same-address-for-input-and-output">Can a Bitcoin transaction have the same address for input and output?</a></p>

<p>And the answer is "Yes" and I also tested it. Unspent transactions can be totally sent to its wallet address as well. There is no internal restriction on in and out.</p>

<p>It's already written at Murch's comment but I'm posting answer to accept the question.</p>

CC BY-SA 3.0
2015-07-10T05:32:22.040Z
2015-07-10T05:32:22.040Z
2017-04-13T12:47:33.583Z
Euntai Kim
<p>I think you need to understand a lot more about public and private key cryptography first. It sounds like you have no idea what the address actually is or how it's used in Bitcoin.</p>

<p>Yes, the standard client does generate addresses in advance, and these are used by the client when you request the "creation" of a new address. But if you (or rather your client) does not know the private key associated with the address, you will lose your bitcoins forever.</p>

<p>Therefore you need to know both the address that you are sending to and the private key, to be safe.</p>

<p>Can I recommend that you learn about your wallet and how it works by using your bitcoin client in testnet mode first.</p>

CC BY-SA 3.0
2014-05-29T04:14:17.053Z
I think you totally misunderstood my question. I'm asking that what would happen if I send coins to wallet address which is included in sender addresses. Actually I tested it with alt coin, and it works as expected.
Euntai Kim
CC BY-SA 3.0
2014-05-30T14:33:05.833Z
What you describe is the method by which "change" is given, in the standard client, but you are trying to circumvent this by using the generated addresses directly from wallet.dat - and this is problematic of you do not know what you are doing. My point is not about *sending or receiving*, it is about being able to spend the coins afterwards. Just be careful - don't jump to conclusions.
T9b
CC BY-SA 3.0
2014-05-28T08:43:51.700Z
2014-05-28T08:43:51.700Z
T9b
<p>I have a wallet.dat which has so many addresses in it. Like 1, 2, 3, 4, ....., 1234324234 addresses. (Each number is address)</p>

<p>I backed up original wallet.dat, and I want to use this light wallet.dat from now on.
This light wallet.dat has only 1, 2, 3, .... 100 addresses in it I think.
(keypool size was 100)</p>

<p>Both wallet.dat has same address "1", so is it okay to sending all coins to address "1" and use light wallet.dat after that?</p>

<p>It may cause sending to address "1" from "1". Is it okay?</p>

CC BY-SA 3.0
2014-05-28T08:07:44.830Z
I cannot find anything of the sort, but I suppose it will return an error when you try to send bitcoin to the same address as where it came from.
Mathias711
CC BY-SA 3.0
2014-05-30T07:16:43.683Z
@Mathias711: That is not correct, nothing prevents you from sending Bitcoin to the same address it was stored on before. See [Can a Bitcoin transaction have the same address for input and output?](http://bitcoin.stackexchange.com/questions/12746/can-a-bitcoin-transaction-have-the-same-address-for-input-and-output)
Murch
CC BY-SA 3.0
2014-05-30T11:11:10.270Z
@Murch Ahh, interesting. I tried googling it, but I didn't find anything. Wrong keywords probably
Mathias711
<address>
Is it safe to send to my own address from my wallet?
Euntai Kim
# Is it safe to send to my own address from my wallet?

(Asked by: username_0 on 2014-05-28)

I have a wallet.dat which has so many addresses in it. Like 1, 2, 3, 4, ....., 1234324234 addresses. (Each number is address)

I backed up original wallet.dat, and I want to use this light wallet.dat from now on.
This light wallet.dat has only 1, 2, 3, .... 100 addresses in it I think.
(keypool size was 100)

Both wallet.dat has same address "1", so is it okay to sending all coins to address "1" and use light wallet.dat after that?

It may cause sending to address "1" from "1". Is it okay?

**Tags:** address

> **Comments:**
> **username_1**: I cannot find anything of the sort, but I suppose it will return an error when you try to send bitcoin to the same address as where it came from.  
> **username_2**: @username_1: That is not correct, nothing prevents you from sending Bitcoin to the same address it was stored on before. See [Can a Bitcoin transaction have the same address for input and output?](http://bitcoin.stackexchange.com/questions/12746/can-a-bitcoin-transaction-have-the-same-address-for-input-and-output)  
> **username_1**: @username_2 Ahh, interesting. I tried googling it, but I didn't find anything. Wrong keywords probably  

---

## 2 answers

### Answer by username_0 on 2015-07-10. Score: 1 | Accepted answer

Related question was asked at [Can a Bitcoin transaction have the same address for input and output?](https://bitcoin.stackexchange.com/questions/12746/can-a-bitcoin-transaction-have-the-same-address-for-input-and-output)

And the answer is "Yes" and I also tested it. Unspent transactions can be totally sent to its wallet address as well. There is no internal restriction on in and out.

It's already written at username_2's comment but I'm posting answer to accept the question.


---

### Answer by username_3 on 2014-05-28. Score: 1

I think you need to understand a lot more about public and private key cryptography first. It sounds like you have no idea what the address actually is or how it's used in Bitcoin.

Yes, the standard client does generate addresses in advance, and these are used by the client when you request the "creation" of a new address. But if you (or rather your client) does not know the private key associated with the address, you will lose your bitcoins forever.

Therefore you need to know both the address that you are sending to and the private key, to be safe.

Can I recommend that you learn about your wallet and how it works by using your bitcoin client in testnet mode first.

> **Comments:**
> **username_0**: I think you totally misunderstood my question. I'm asking that what would happen if I send coins to wallet address which is included in sender addresses. Actually I tested it with alt coin, and it works as expected.  
> **username_3**: What you describe is the method by which "change" is given, in the standard client, but you are trying to circumvent this by using the generated addresses directly from wallet.dat - and this is problematic of you do not know what you are doing. My point is not about *sending or receiving*, it is about being able to spend the coins afterwards. Just be careful - don't jump to conclusions.  

---

