<p>That is called a vanity address, and Bitcoin Core does not support generating vanity addresses. In order to do that, you would have to find a vanity address generator (separate piece of software). But then, you have to audit the code to make sure it is not doing anything funny with your private key. Bitcoin Core is open source, so you can audit the code that generates the keys if you want.</p>

<p>The address prefix denotes the type of script the address encodes. A bitcoin address that starts with a <code>1</code> is a <code>Pay-to-Pubkey-Hash</code> address, and a <code>3</code> is a <code>Pay-to-Script-Hash</code>. See <a href="https://en.bitcoin.it/wiki/List_of_address_prefixes" rel="nofollow noreferrer">Address Prefixes</a> </p>

<p>You can change the type of address the cli generates by passing an optional argument to <code>getnewaddress</code> see <a href="https://bitcoincore.org/en/doc/0.18.0/rpc/wallet/getnewaddress/" rel="nofollow noreferrer">RPC Docs - getnewaddress</a>:</p>

<pre><code>bitcoin-cli getnewaddress "label" "address_type"
</code></pre>

<p><code>address_type</code> options are "legacy", "p2sh-segwit", and "bech32"</p>

CC BY-SA 4.0
2019-08-26T17:20:09.347Z
if my address starts with 1 is it preferred to send transactions to addresses starts with 1 also ?

as both are different in some way may face any issues in the future sending 1 to 3 or from 3 to 1? that make coins get lost
BTC involver
CC BY-SA 4.0
2019-08-26T17:21:40.443Z
can you also check that for vanity for btccore? https://bitcointalk.org/index.php?topic=1387.0
BTC involver
CC BY-SA 4.0
2019-08-26T17:35:50.527Z
It doesn't matter which address you send to and from as long as the wallet software knows how to spend it. Bitcoin Core wallet can spend from any address it generates. I don't understand your second comment.
JBaczuk
CC BY-SA 4.0
2019-08-26T17:37:50.330Z
the second comment is a guy who created customized address through 'getnewaddress' the link from his bitcointalk.org  post
BTC involver
CC BY-SA 4.0
2019-08-26T17:52:46.687Z
sorry I can't comment on that, i don't see the attachment, but the thread looks pretty old
JBaczuk
CC BY-SA 4.0
2019-08-26T17:16:06.287Z
2019-08-26T17:16:06.287Z
JBaczuk
<blockquote>
  <p>can i customize my address start through getnewaddress?</p>
</blockquote>

<p>No, <code>getnewaddress</code> will return a new address each time, and the address string will be random. To create an address that begins with a specific string of characters, you will need to use some software to iterate through many random addresses, before an address with your desired string is found. This type of address is called a ‘vanity address’. If you search for that term you will find more info. </p>

<blockquote>
  <p>also what's the difference between addresses starting with 1 and addresses starting with 3?</p>
</blockquote>

<p>An address starting with a 1 is a ‘pay to public key hash’ (P2PKH) address, whereas an address starting with a 3 is a ‘pay to script hash’ (P2SH) address. If you search for those two terms, you’ll find lots of additional info on this site about the differences between the two. </p>

<blockquote>
  <p>the reason of the need to customized addresses to make sure that it really creates this offline addresses instantly and is not in a hidden database installed while installing the bitcoin-cli</p>
</blockquote>

<p>If you build bitcoin-core from source, then you can audit the code yourself ensure that no pre-derived/hardcoded addresses are being presented to you. Alternatively, you can trust the open-source process that involves countless developers that have audited the code to ensure no backdoors like this exist. </p>

<p>But if you really must verify the legitimacy of the presented addresses in this way, you’ll need to write a program to generate new addresses repeatedly, and then check the returned address to see if it matches your desired string. You may be able to find a ‘vanitygen’ style of software that can do this more efficiently, which is desirable for finding longer specific strings. Each additional specific character you desire will make the search 58x more difficult (since the address format is in base 58). </p>

CC BY-SA 4.0
2019-08-26T17:34:50.783Z
2019-08-26T17:34:50.783Z
chytrik
<p>I have written a program in Python3 that allows you to search for any address on bitcoin core whether it belongs to your wallet or not.</p>
<p>Here is the github link:</p>
<p><a href="https://github.com/ORP967/Bitcoin_Core_RPC_par_address" rel="nofollow noreferrer">https://github.com/ORP967/Bitcoin_Core_RPC_par_address</a></p>
<p>Let me know what you think or if you have any improvements you might have.</p>

CC BY-SA 4.0
2022-01-23T23:09:03.187Z
2022-01-23T23:09:03.187Z
ORP967
<p>can i customize my address start through getnewaddress?</p>

<p>for example instead the address start with 1asdjIOAWJRA</p>

<p>i write getnewaddress 1xxxx then it continues as it wish</p>

<p>also what's the difference between addresses starting with 1 and addresses starting with 3?</p>

<p>can i choose from bitcoin-cli to get my address starting with 1 or it must be random and can be started by 3 while i dont wish that?</p>

<p>the reason of the need to customized addresses to make sure that it really creates this offline addresses instantly and is not in a hidden database installed while installing the bitcoin-cli</p>

<bitcoin-cli>
bitcoin-cli getnewaddress
BTC involver
# bitcoin-cli getnewaddress

(Asked by: username_0 on 2019-08-26)

can i customize my address start through getnewaddress?

for example instead the address start with 1asdjIOAWJRA

i write getnewaddress 1xxxx then it continues as it wish

also what's the difference between addresses starting with 1 and addresses starting with 3?

can i choose from bitcoin-cli to get my address starting with 1 or it must be random and can be started by 3 while i dont wish that?

the reason of the need to customized addresses to make sure that it really creates this offline addresses instantly and is not in a hidden database installed while installing the bitcoin-cli

**Tags:** bitcoin-cli


---

## 3 answers

### Answer by username_1 on 2019-08-26. Score: 3 | Accepted answer

That is called a vanity address, and Bitcoin Core does not support generating vanity addresses. In order to do that, you would have to find a vanity address generator (separate piece of software). But then, you have to audit the code to make sure it is not doing anything funny with your private key. Bitcoin Core is open source, so you can audit the code that generates the keys if you want.

The address prefix denotes the type of script the address encodes. A bitcoin address that starts with a `1` is a `Pay-to-Pubkey-Hash` address, and a `3` is a `Pay-to-Script-Hash`. See [Address Prefixes](https://en.bitcoin.it/wiki/List_of_address_prefixes)

You can change the type of address the cli generates by passing an optional argument to `getnewaddress` see [RPC Docs - getnewaddress](https://bitcoincore.org/en/doc/0.18.0/rpc/wallet/getnewaddress/):

```
bitcoin-cli getnewaddress "label" "address_type"

```

`address_type` options are "legacy", "p2sh-segwit", and "bech32"

> **Comments:**
> **username_0**: if my address starts with 1 is it preferred to send transactions to addresses starts with 1 also ?  as both are different in some way may face any issues in the future sending 1 to 3 or from 3 to 1? that make coins get lost  
> **username_0**: can you also check that for vanity for btccore? https://bitcointalk.org/index.php?topic=1387.0  
> **username_1**: It doesn't matter which address you send to and from as long as the wallet software knows how to spend it. Bitcoin Core wallet can spend from any address it generates. I don't understand your second comment.  
> **username_0**: the second comment is a guy who created customized address through 'getnewaddress' the link from his bitcointalk.org  post  
> **username_1**: sorry I can't comment on that, i don't see the attachment, but the thread looks pretty old  

---

### Answer by username_2 on 2019-08-26. Score: 1

> can i customize my address start through getnewaddress?

No, `getnewaddress` will return a new address each time, and the address string will be random. To create an address that begins with a specific string of characters, you will need to use some software to iterate through many random addresses, before an address with your desired string is found. This type of address is called a ‘vanity address’. If you search for that term you will find more info.

> also what's the difference between addresses starting with 1 and addresses starting with 3?

An address starting with a 1 is a ‘pay to public key hash’ (P2PKH) address, whereas an address starting with a 3 is a ‘pay to script hash’ (P2SH) address. If you search for those two terms, you’ll find lots of additional info on this site about the differences between the two.

> the reason of the need to customized addresses to make sure that it really creates this offline addresses instantly and is not in a hidden database installed while installing the bitcoin-cli

If you build bitcoin-core from source, then you can audit the code yourself ensure that no pre-derived/hardcoded addresses are being presented to you. Alternatively, you can trust the open-source process that involves countless developers that have audited the code to ensure no backdoors like this exist.

But if you really must verify the legitimacy of the presented addresses in this way, you’ll need to write a program to generate new addresses repeatedly, and then check the returned address to see if it matches your desired string. You may be able to find a ‘vanitygen’ style of software that can do this more efficiently, which is desirable for finding longer specific strings. Each additional specific character you desire will make the search 58x more difficult (since the address format is in base 58).


---

### Answer by username_3 on 2022-01-23. Score: 0

I have written a program in Python3 that allows you to search for any address on bitcoin core whether it belongs to your wallet or not.

Here is the github link:

<https://github.com/username_3/Bitcoin_Core_RPC_par_address>

Let me know what you think or if you have any improvements you might have.


---

