# Derive addresses from an extended public key

Derive receive and change Bitcoin addresses from an xpub, ypub, zpub, tpub, upub, or vpub. Watch-only, offline, and private in your browser.

## Run it

- **CLI:** `gizza tool xpub-derive "zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs"`
- **Web:** https://gizza.ai/tools/xpub-derive/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/xpub-derive/tool.json

## Inputs

- `xpub` — Extended public key _(field)_
- `chain` — Chain _(field)_
- `count` — Addresses per chain _(field)_
- `start` — Start index _(field)_
- `address_type` — Address type _(field)_
- `format` — Output format _(field)_
- `include_public_key` — Include public key column _(field)_

## Output

- Derived addresses (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `xpub` — Extended public key
- `chain` — Chain
- `count` — Addresses per chain
- `start` — Start index
- `address_type` — Address type
- `format` — Output format
- `include_public_key` — Include public key column

Example: `https://gizza.ai/tools/xpub-derive/?xpub=zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs&chain=both&count=10&start=0&address_type=auto&format=table&include_public_key=true`

---

# Watch-only xpub address derivation

Derive Bitcoin receive and change addresses from an extended public key without ever handling private keys. Paste an `xpub`, `ypub`, `zpub`, `tpub`, `upub`, or `vpub`, choose the chain and range, and get deterministic watch-only addresses for audits, wallet checks, and gap-limit review.

Everything runs locally in the browser. Extended private keys are rejected.

## Worked example

Use the BIP84 account zpub from the public test vector:

- `xpub`: `zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs`
- `chain`: `receive`
- `count`: `2`
- `start`: `0`
- `address_type`: `auto`
- `format`: `table`

The first two receive addresses are `bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu` and `bc1qnjg0jd8228aq7egyzacy8cys3knf9xvrerkf9g`.

## Inputs

- `xpub` accepts single-signature extended public keys: `xpub`/`ypub`/`zpub` on mainnet and `tpub`/`upub`/`vpub` on testnet.
- `chain` chooses receive (`m/0/i`), change (`m/1/i`), or both.
- `count` derives 1 to 100 addresses per selected chain. `20` matches the common wallet gap-limit batch.
- `start` pages through a chain without deriving hardened children.
- `address_type=auto` follows the key prefix; explicit choices can render legacy, wrapped SegWit, or native SegWit addresses from the same public key.
- `format` selects a readable table, CSV rows, or a bare address list.

## Limits and edge cases

This is a Bitcoin single-signature BIP32/BIP44-style public derivation tool. It does not derive hardened children from an xpub, does not accept private keys or mnemonics, and does not support multisig `Ypub`/`Zpub` policy descriptors. Taproot x-only output, script descriptors, and altcoin version bytes are outside this tool's model.

<details>
<summary>Is it safe to paste an xpub here?</summary>

An xpub is public enough to derive addresses, but it can reveal wallet history if shared. This page runs locally and never uploads it, but you should still treat extended public keys as sensitive watch-only wallet data.
</details>

<details>
<summary>Why are xprv, yprv, and zprv rejected?</summary>

Those are extended private keys. A watch-only address tool should not need private material, so this tool rejects private prefixes instead of deriving from them.
</details>

<details>
<summary>What does address_type=auto do?</summary>

`auto` follows the extended key prefix: `xpub`/`tpub` produce legacy P2PKH addresses, `ypub`/`upub` produce wrapped SegWit P2SH-P2WPKH addresses, and `zpub`/`vpub` produce native SegWit bech32 addresses.
</details>

<details>
<summary>How do I check the usual wallet gap limit?</summary>

Set `chain=receive`, `start=0`, and `count=20` to list the first 20 receive addresses. Increase `start` by 20 for the next page.
</details>

## Related tools

- [BIP39 Mnemonic Seed Phrase Generator](https://gizza.ai/tools/bip39-mnemonic-generator/): Generate a BIP39 mnemonic seed phrase (12–24 words) with checksum and derived 512-bit seed, entirely in your browser. Optional passphrase. Free and private.
- [BIP39 Seed Derivation](https://gizza.ai/tools/bip39-seed-derive/): Derive the 512-bit BIP39 seed from an existing mnemonic recovery phrase and optional passphrase, in your browser. Validates the wordlist and checksum. Free and private.
- [BIP32 HD Key Derivation](https://gizza.ai/tools/hd-key-derive/): Derive BIP32 child private keys, xpubs, WIF keys, and Bitcoin mainnet/testnet P2PKH or SegWit addresses from a seed or xprv. Private and offline in your browser.
- [secp256k1 Public Key Derivation](https://gizza.ai/tools/secp256k1-pubkey-derive/): Derive the secp256k1 public key from a private key: compressed (02/03) and uncompressed (04) SEC1 points, plus X and Y coordinates. Hex or WIF input, all in your browser.
- [AES cipher](https://gizza.ai/tools/aes-cipher/): Encrypt or decrypt text with AES in CBC, CTR, GCM or ECB mode and 128/192/256-bit keys, with hex/base64 I/O — in your browser. Nothing is uploaded.
