<p>In Go, you can do this very easily:</p>



<pre><code>package main

import (
    "fmt"

    "github.com/btcsuite/btcutil/base58"
)

var addresses = []string{
    "1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB",
    "1Le1ttNd2GQ79212Epyciw39JDy2E6DYWf",
    "1LpRieyPAZfFyUSMGiZhwAarQoJw1Y8pEx",
}

func main() {
    for _, address := range addresses {
        ripemd160, _, err := base58.CheckDecode(address)
        if err != nil {
            fmt.Printf("Failed to decode address %s: %s\n", address, err)
            continue
        }

        fmt.Printf("HASH160 %x from address %s\n", ripemd160, address)
    }
}
</code></pre>

<p>When you have Go installed, you can run this code very easily in your terminal:</p>

<pre><code>$ go get github.com/btcsuite/btcutil/base58
$ go run thefile.go
HASH160 edf10a7fac6b32e24daa5305c723f3de58db1bc8 from address 1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB
HASH160 d76a86f903b33835f06d7b18a1429a8f249f3ab1 from address 1Le1ttNd2GQ79212Epyciw39JDy2E6DYWf
HASH160 d96292e45d045d2269a818b96b13422555557d85 from address 1LpRieyPAZfFyUSMGiZhwAarQoJw1Y8pEx
</code></pre>

CC BY-SA 3.0
2017-11-22T10:19:37.637Z
Hi @Steven can it just accept a txt file consisting the base58? Since I have thousands of base58 to convert. Thank you.
Nael Cruz
CC BY-SA 3.0
2017-12-05T10:56:14.003Z
@NaelCruz this should work: https://gist.github.com/stevenroose/de1cdd183b1d3b9a6e5a5623a4ca969a
Steven Roose
CC BY-SA 3.0
2017-11-22T10:12:36.530Z
2017-11-22T10:12:36.530Z
Steven Roose
<pre><code>static const QByteArray convert ( const QLatin1String&amp; buf )
{
  QByteArray ret;
  ret.resize ( 20 );
  quint8 addr [30];
  BASE58::decodeBase58 ( buf.latin1 ( ), addr, 26, true );
  memcpy ( ret.data ( ), addr + 1, 20 );
//printf ( "%s\n", ret.toHex ( ).constData ( ) );
  return ret.toHex ( );
}
</code></pre>

<p>Oups, sorry. This is not an answer if you are looking for <strong>online</strong> solution</p>

CC BY-SA 3.0
2017-11-23T07:59:34.870Z
Hello @amaclin thanks for your answer. Where can I reach you I have some ideas maybe we can collaborate .
Nael Cruz
CC BY-SA 3.0
2017-11-22T08:45:41.747Z
2017-11-22T08:45:41.747Z
amaclin
<p>Are there online tool or repositories that can convert multiple base58  (BTC address) to base16 simultaneously?</p>

CC BY-SA 3.0
2017-11-22T07:04:28.133Z
what do you need? the address **is** hash160. are you looking for a tool for converting from `base58` to `base16` (aka hex)?
amaclin
CC BY-SA 3.0
2017-11-22T08:00:01.450Z
Hello @amaclin sorry about that, I mean base58(BTC address) to ripemd160. I need a tool that can convert multiple address simultaneously.
Nael Cruz
CC BY-SA 3.0
2017-11-22T08:25:46.083Z
I see you do not understand this. Can you provide an example of one pair (A,B) where `A` is what you have and `B` is what you want before asking a tool?
amaclin
CC BY-SA 3.0
2017-11-22T08:30:03.263Z
Alright. A is 1CiezJhGh4YqT1gv4NuBJ9pQAXSFkSEXXG I need to find B which is 808a261b6a7b67371958523913a035274fe4c4d0
Nael Cruz
CC BY-SA 3.0
2017-11-22T10:18:15.343Z
Both A and B are hash160 outputs, which is the source of the confusion here. The only difference is the representation of the values. A is encoded as base58 and B as base16 (hex). I suggest you edit the question to reflect this.
Daniel R
<base58><address-format><ripemd160>
Convert list of BTC address(base58) to Ripemd16(base16)
Nael Cruz
# Convert list of BTC address(base58) to Ripemd16(base16)

(Asked by: username_0 on 2017-11-22)

Are there online tool or repositories that can convert multiple base58 (BTC address) to base16 simultaneously?

**Tags:** base58, address-format, ripemd160

> **Comments:**
> **username_1**: what do you need? the address **is** hash160. are you looking for a tool for converting from `base58` to `base16` (aka hex)?  
> **username_0**: Hello @username_1 sorry about that, I mean base58(BTC address) to ripemd160. I need a tool that can convert multiple address simultaneously.  
> **username_1**: I see you do not understand this. Can you provide an example of one pair (A,B) where `A` is what you have and `B` is what you want before asking a tool?  
> **username_0**: Alright. A is 1CiezJhGh4YqT1gv4NuBJ9pQAXSFkSEXXG I need to find B which is 808a261b6a7b67371958523913a035274fe4c4d0  
> **username_2**: Both A and B are hash160 outputs, which is the source of the confusion here. The only difference is the representation of the values. A is encoded as base58 and B as base16 (hex). I suggest you edit the question to reflect this.  

---

## 2 answers

### Answer by username_3 on 2017-11-22. Score: 1

In Go, you can do this very easily:
package main

import (
    "fmt"

    "github.com/btcsuite/btcutil/base58"
)

var addresses = []string{
    "1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB",
    "1Le1ttNd2GQ79212Epyciw39JDy2E6DYWf",
    "1LpRieyPAZfFyUSMGiZhwAarQoJw1Y8pEx",
}

func main() {
    for _, address := range addresses {
        ripemd160, _, err := base58.CheckDecode(address)
        if err != nil {
            fmt.Printf("Failed to decode address %s: %s\n", address, err)
            continue
        }

        fmt.Printf("HASH160 %x from address %s\n", ripemd160, address)
    }
}

When you have Go installed, you can run this code very easily in your terminal:
$ go get github.com/btcsuite/btcutil/base58
$ go run thefile.go
HASH160 edf10a7fac6b32e24daa5305c723f3de58db1bc8 from address 1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB
HASH160 d76a86f903b33835f06d7b18a1429a8f249f3ab1 from address 1Le1ttNd2GQ79212Epyciw39JDy2E6DYWf
HASH160 d96292e45d045d2269a818b96b13422555557d85 from address 1LpRieyPAZfFyUSMGiZhwAarQoJw1Y8pEx

> **Comments:**
> **username_0**: Hi @Steven can it just accept a txt file consisting the base58? Since I have thousands of base58 to convert. Thank you.  
> **username_3**: @NaelCruz this should work: https://gist.github.com/stevenroose/de1cdd183b1d3b9a6e5a5623a4ca969a  

---

### Answer by username_1 on 2017-11-22. Score: -2

static const QByteArray convert ( const QLatin1String& buf )
{
  QByteArray ret;
  ret.resize ( 20 );
  quint8 addr [30];
  BASE58::decodeBase58 ( buf.latin1 ( ), addr, 26, true );
  memcpy ( ret.data ( ), addr + 1, 20 );
//printf ( "%s\n", ret.toHex ( ).constData ( ) );
  return ret.toHex ( );
}

Oups, sorry. This is not an answer if you are looking for online solution

> **Comments:**
> **username_0**: Hello @username_1 thanks for your answer. Where can I reach you I have some ideas maybe we can collaborate .  

---

