<p>It's pretty simple, to do this conversion all you need to do is:</p>

<ol>
<li>decode the address using <code>base58check</code></li>
<li>change the first byte from <code>0x32</code> to <code>0x5</code></li>
<li>encode using <code>base58check</code></li>
</ol>

CC BY-SA 4.0
2019-02-11T22:18:59.180Z
2019-02-11T22:18:59.180Z
JBaczuk
<p>currently im facing with 1 issue that i need to convert all my litecoin address in my fullnode to legacy address (prefix with "M"). Im know that we have a tool <a href="https://litecoin-project.github.io/p2sh-convert/" rel="nofollow noreferrer">https://litecoin-project.github.io/p2sh-convert/</a> that can help me solve this, but my system currently dev with java, so im asking there is any convert that wrote by java support me this problem ??</p>

<p>Thank for read</p>

<address><litecoin><p2sh><p2pkh>
convert "M" address to "3" address LTC
redondoxx
# convert "M" address to "3" address LTC

(Asked by: username_0 on 2019-02-11)

currently im facing with 1 issue that i need to convert all my litecoin address in my fullnode to legacy address (prefix with "M"). Im know that we have a tool <https://litecoin-project.github.io/p2sh-convert/> that can help me solve this, but my system currently dev with java, so im asking there is any convert that wrote by java support me this problem ??

Thank for read

**Tags:** address, litecoin, p2sh, p2pkh


---

## 1 answers

### Answer by username_1 on 2019-02-11. Score: 1

It's pretty simple, to do this conversion all you need to do is:

1. decode the address using `base58check`
2. change the first byte from `0x32` to `0x5`
3. encode using `base58check`


---

