<p>You can use the <a href="https://github.com/input-output-hk/bech32" rel="nofollow noreferrer"><code>bech32</code></a> command line software that comes preinstalled with <a href="https://github.com/input-output-hk/cardano-wallet" rel="nofollow noreferrer"><code>cardano-wallet</code></a>.</p>
<p>Install bech32 or cardano-wallet.</p>
<p>Here is an example:</p>
<p>Say I have an <code>cc.xpub</code> file from ccvault like this: <code>xpub1vep8yyse8ja7yspv0ytjdu0rnk4ek08prkuvre6t76mwryp6cdq7azzd684psvm2j55qp2rhm3zpl0x7en96p2esnvfj905pax48czc7hc0f6</code></p>
<p>From your command line, run: <code>cat cc.xpub | bech32 &gt;&gt; cc.b32</code> - this will output the bech32 format (in the above example, it would be <code>66427212193cbbe2402c791726f1e39dab9b3ce11db8c1e74bf6b6e1903ac341ee884dd1ea18336a952800a877dc441fbcdecccba0ab309b1322be81e9aa7c0b</code>), and save it under the file <code>cc.b32</code></p>
<p>Next, run: <code>bech32 acct_xvk &lt;&lt;&lt; $(cat cc.b32) &gt;&gt; cc.xvk</code></p>
<p>This will convert the bech32 encoded <code>cc.b32</code> key into a cardano-wallet compatible acct_xvk, saved under the file <code>cc.xvk</code></p>
<p>In the above example, the result is: <code>acct_xvk1vep8yyse8ja7yspv0ytjdu0rnk4ek08prkuvre6t76mwryp6cdq7azzd684psvm2j55qp2rhm3zpl0x7en96p2esnvfj905pax48czcdg4029</code></p>

CC BY-SA 4.0
2022-03-22T19:53:41.180Z
This worked! Thank you very much! Can't upvote unfortunately due to low karma.
Ran Shorowitz
CC BY-SA 4.0
2022-03-22T13:43:32.210Z
2022-03-22T13:43:32.210Z
zhekson
<p>Trying to import my wallet into Koinly for tax-purposes and unfortunately it doesn't accept xpub public addresses.</p>
<p>They just recently added Cardano Native Tokens to their platform and they support act_ keys (and bech32?)</p>
<p>Just wondering if there's a way I can convert xpub to either an act_ key or a bech32-compatible key so I can import my ccvault wallet into Koinly.</p>
<p>I tried the bech32.exe program for Windows but I could not figure out how to use it or convert my public key.</p>

<wallet><public-key><converter>
Convert xpub public key from ccvault to bech32 or acct_ public key
# Convert xpub public key from ccvault to bech32 or acct_ public key

(Asked by: username_0 on 2022-03-22)

Trying to import my wallet into Koinly for tax-purposes and unfortunately it doesn't accept xpub public addresses.

They just recently added Cardano Native Tokens to their platform and they support act\_ keys (and bech32?)

Just wondering if there's a way I can convert xpub to either an act\_ key or a bech32-compatible key so I can import my ccvault wallet into Koinly.

I tried the bech32.exe program for Windows but I could not figure out how to use it or convert my public key.

**Tags:** wallet, public-key, converter

---

## 1 answers

### Answer by username_1 on 2022-03-22. Score: 1 | Accepted answer

You can use the [`bech32`](https://github.com/input-output-hk/bech32) command line software that comes preinstalled with [`cardano-wallet`](https://github.com/input-output-hk/cardano-wallet).

Install bech32 or cardano-wallet.

Here is an example:

Say I have an `cc.xpub` file from ccvault like this: `xpub1vep8yyse8ja7yspv0ytjdu0rnk4ek08prkuvre6t76mwryp6cdq7azzd684psvm2j55qp2rhm3zpl0x7en96p2esnvfj905pax48czc7hc0f6`

From your command line, run: `cat cc.xpub | bech32 >> cc.b32` - this will output the bech32 format (in the above example, it would be `66427212193cbbe2402c791726f1e39dab9b3ce11db8c1e74bf6b6e1903ac341ee884dd1ea18336a952800a877dc441fbcdecccba0ab309b1322be81e9aa7c0b`), and save it under the file `cc.b32`

Next, run: `bech32 acct_xvk <<< $(cat cc.b32) >> cc.xvk`

This will convert the bech32 encoded `cc.b32` key into a cardano-wallet compatible acct\_xvk, saved under the file `cc.xvk`

In the above example, the result is: `acct_xvk1vep8yyse8ja7yspv0ytjdu0rnk4ek08prkuvre6t76mwryp6cdq7azzd684psvm2j55qp2rhm3zpl0x7en96p2esnvfj905pax48czcdg4029`

> **Comments:**
> **username_0**: This worked! Thank you very much! Can't upvote unfortunately due to low karma.  

---

