<p>This seemed like an interesting thing to do. So I created a tool to do it.</p>
<p><a href="https://github.com/redgrittybrick/base43" rel="nofollow noreferrer">https://github.com/redgrittybrick/base43</a></p>
<pre><code>C&gt; type example.base43.txt
71OUKK$VH33.J1Y/K8Q8T3-F8X59N/YIO*LXY.7320F/5.KN$EG47LC*I1VP$S7FS2+.KAJR5:8$-MDQTMHA54/QT3R$JVX/WRDLONP/*TJLGIHRB.KNSGZWVUW9TOSOE6G1::..-NLQNJD-R1GNJ.HA7A1M.6CS:-60X9LR9XHHB6B1KLTX4T/EZN3$ZWW+J10-Z9QU-N9HHU$EV865ED$3JD$ZUJ6IA2Z:.WXKXTCK2:BMZFW3F+QI.GS54BN3*Q1T*3C1ESF0QA:ZOX1RLG/I/I1GPL:FPLRKAKH:KO4*U0YAK16-CGI-Z7A3EQAJ8Q484VA05FE7JO$-U.HBFWNFSFD8EGPJR*QV3YJD5SHA3BLWM+FR0*FS7M89S115/PU7:6-XW:EPL4/+7N2RFM/**Z6J*/--97OD2QWSLUE7G5F42ATP0SAV52U1GV+WZAJX$T0R:49QIDYJUKOXWX.$UUTR5596EOVK88E$ALJ-/MEML4883J5572D1-LRSXTRYL:X39U8QQ0XII09I5M3:13$U+B7V3S1+YUQM3:G+A/IH9+$.CHEOGE-3NX:OZ+H1D*N3IFC9+/ZT*S/O45QLRC

C&gt; base43 -decode -hex &lt; example.base43.txt
0100000001ac01d39c405d31d3d20b00254e84dce9838b9c280f3aa07bf77a1510d8f8779900000000fd4201004830450221009a4065d3b869f20b6e858e0722d9b511213e09dcf1b61072cccbff340c7f424e022034c42927a64fe323d8e8b76d99960322bf0664fdad9994939aedac74a32ca8c701483045022100dda3d5974ae1c06d9742c7aa5e2f789218054c60476f049300c7d4d0395819aa02201f484d7a2b4cc6186b23f54ea4099a728760d71fcc0c7a82bd056c6eaeacf3ab014cad5221020de4d18c5b852a3c1d1f1033a812b019c396b75cab2a248089b09632c7bbdda221024ee8ab3639ea02d7fac7e90078b16c06811573d7046cd06b5d1d8d7e50e0767a21025392159aaf967c2f7e1dca92b68d1b3abaf44a9d3903f7382e76f9f64e7bfa242102df269b98c7ea5bdec1aac268d6107b827163d3a0ca8bd3522279d14c46e1bf1a2103cfbf85d74dddf892b3b6f918fd36dab13cc904d9ba3c9306e9e25fe53ebde08155aeffffffff01131f0000000000001976a914e9cc1b59c97f860f5c629c23d93920da60648d0388ac00000000

C&gt; type example.hex.txt
0100000001ac01d39c405d31d3d20b00254e84dce9838b9c280f3aa07bf77a1510d8f8779900000000fd4201004830450221009a4065d3b869f20b6e858e0722d9b511213e09dcf1b61072cccbff340c7f424e022034c42927a64fe323d8e8b76d99960322bf0664fdad9994939aedac74a32ca8c701483045022100dda3d5974ae1c06d9742c7aa5e2f789218054c60476f049300c7d4d0395819aa02201f484d7a2b4cc6186b23f54ea4099a728760d71fcc0c7a82bd056c6eaeacf3ab014cad5221020de4d18c5b852a3c1d1f1033a812b019c396b75cab2a248089b09632c7bbdda221024ee8ab3639ea02d7fac7e90078b16c06811573d7046cd06b5d1d8d7e50e0767a21025392159aaf967c2f7e1dca92b68d1b3abaf44a9d3903f7382e76f9f64e7bfa242102df269b98c7ea5bdec1aac268d6107b827163d3a0ca8bd3522279d14c46e1bf1a2103cfbf85d74dddf892b3b6f918fd36dab13cc904d9ba3c9306e9e25fe53ebde08155aeffffffff01131f0000000000001976a914e9cc1b59c97f860f5c629c23d93920da60648d0388ac00000000

C&gt; base43 -hex &lt; example.hex.txt
71OUKK$VH33.J1Y/K8Q8T3-F8X59N/YIO*LXY.7320F/5.KN$EG47LC*I1VP$S7FS2+.KAJR5:8$-MDQTMHA54/QT3R$JVX/WRDLONP/*TJLGIHRB.KNSGZWVUW9TOSOE6G1::..-NLQNJD-R1GNJ.HA7A1M.6CS:-60X9LR9XHHB6B1KLTX4T/EZN3$ZWW+J10-Z9QU-N9HHU$EV865ED$3JD$ZUJ6IA2Z:.WXKXTCK2:BMZFW3F+QI.GS54BN3*Q1T*3C1ESF0QA:ZOX1RLG/I/I1GPL:FPLRKAKH:KO4*U0YAK16-CGI-Z7A3EQAJ8Q484VA05FE7JO$-U.HBFWNFSFD8EGPJR*QV3YJD5SHA3BLWM+FR0*FS7M89S115/PU7:6-XW:EPL4/+7N2RFM/**Z6J*/--97OD2QWSLUE7G5F42ATP0SAV52U1GV+WZAJX$T0R:49QIDYJUKOXWX.$UUTR5596EOVK88E$ALJ-/MEML4883J5572D1-LRSXTRYL:X39U8QQ0XII09I5M3:13$U+B7V3S1+YUQM3:G+A/IH9+$.CHEOGE-3NX:OZ+H1D*N3IFC9+/ZT*S/O45QLRC
</code></pre>
<p>Seems OK.</p>
<p>The code is simple enough to be read and seen to be free of any malicious intent by almost anyone. I would suggest that any program used in connection with cryptocurrency should be compiled from source after inspecting the code. The go compiler is a free download from golang.org. Use <code>go build</code> to create a program from the source code.</p>

CC BY-SA 4.0
2022-04-04T20:48:53.087Z
Wow. Dunno what to say? So cool. and thank you, so honored
HansBKK
CC BY-SA 4.0
2022-04-04T18:50:21.187Z
2022-04-04T18:50:21.187Z
RedGrittyBrick
<p>Another kind soul from Reddit:</p>
<p>There were some bugs in jacoblyles/base43js</p>
<p>I fixed them and made a simple html file with all the needed JS embedded.</p>
<p><a href="https://pastebin.com/WHk7iryz" rel="nofollow noreferrer">https://pastebin.com/WHk7iryz</a></p>
<p>Save it to an html file and open it in a browser.</p>
<p>...</p>
<p><a href="https://www.reddit.com/r/Electrum/comments/ts03xj/electrums_custom_base43_looking_for_a_2way" rel="nofollow noreferrer">https://www.reddit.com/r/Electrum/comments/ts03xj/electrums_custom_base43_looking_for_a_2way</a></p>

CC BY-SA 4.0
2022-04-04T21:03:38.977Z
2022-04-04T21:03:38.977Z
HansBKK
<p>I am looking for a tool, suitable for an amnesiac offline air-gapped Linux Live host</p>
<p>that will deterministically convert in both directions, between raw hex and Electrum's custom Base43 format, used to fit 2900+ bytes of BTC transaction data into L-40 QR codes,</p>
<p>without my needing to learn to program, please!</p>
<p>...
functions from Electrum:</p>
<p>base_encode(tx_bytes, base=43)</p>
<p>base_decode(raw, base=43).hex()</p>
<p>...
This tool only decodes, no encoding</p>
<p><a href="http://electrum43.org" rel="nofollow noreferrer">http://electrum43.org</a></p>
<p><a href="https://github.com/jacoblyles/base43js" rel="nofollow noreferrer">https://github.com/jacoblyles/base43js</a></p>
<p>...
references:</p>
<p><a href="https://jacobexmachina.blogspot.com/2016/10/using-electrum-on-airgapped-machine.html" rel="nofollow noreferrer">https://jacobexmachina.blogspot.com/2016/10/using-electrum-on-airgapped-machine.html</a></p>
<p><a href="https://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg04330.html" rel="nofollow noreferrer">https://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg04330.html</a></p>
<p><a href="https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-February/007613.html" rel="nofollow noreferrer">https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-February/007613.html</a></p>
<p><a href="https://github.com/spesmilo/electrum/issues/5746" rel="nofollow noreferrer">https://github.com/spesmilo/electrum/issues/5746</a></p>

<transactions><electrum><qrcode><encoding><tools>
Electrum's custom Base43 - looking for a 2-way deterministic hex converter
HansBKK
# Electrum's custom Base43 - looking for a 2-way deterministic hex converter

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

I am looking for a tool, suitable for an amnesiac offline air-gapped Linux Live host

that will deterministically convert in both directions, between raw hex and Electrum's custom Base43 format, used to fit 2900+ bytes of BTC transaction data into L-40 QR codes,

without my needing to learn to program, please!

...
functions from Electrum:

base\_encode(tx\_bytes, base=43)

base\_decode(raw, base=43).hex()

...
This tool only decodes, no encoding

<http://electrum43.org>

<https://github.com/jacoblyles/base43js>

...
references:

<https://jacobexmachina.blogspot.com/2016/10/using-electrum-on-airgapped-machine.html>

<https://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg04330.html>

<https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-February/007613.html>

<https://github.com/spesmilo/electrum/issues/5746>

**Tags:** transactions, electrum, qrcode, encoding, tools


---

## 2 answers

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

This seemed like an interesting thing to do. So I created a tool to do it.
https://github.com/redgrittybrick/base43
C> type example.base43.txt
71OUKK$VH33.J1Y/K8Q8T3-F8X59N/YIO*LXY.7320F/5.KN$EG47LC*I1VP$S7FS2+.KAJR5:8$-MDQTMHA54/QT3R$JVX/WRDLONP/*TJLGIHRB.KNSGZWVUW9TOSOE6G1::..-NLQNJD-R1GNJ.HA7A1M.6CS:-60X9LR9XHHB6B1KLTX4T/EZN3$ZWW+J10-Z9QU-N9HHU$EV865ED$3JD$ZUJ6IA2Z:.WXKXTCK2:BMZFW3F+QI.GS54BN3*Q1T*3C1ESF0QA:ZOX1RLG/I/I1GPL:FPLRKAKH:KO4*U0YAK16-CGI-Z7A3EQAJ8Q484VA05FE7JO$-U.HBFWNFSFD8EGPJR*QV3YJD5SHA3BLWM+FR0*FS7M89S115/PU7:6-XW:EPL4/+7N2RFM/**Z6J*/--97OD2QWSLUE7G5F42ATP0SAV52U1GV+WZAJX$T0R:49QIDYJUKOXWX.$UUTR5596EOVK88E$ALJ-/MEML4883J5572D1-LRSXTRYL:X39U8QQ0XII09I5M3:13$U+B7V3S1+YUQM3:G+A/IH9+$.CHEOGE-3NX:OZ+H1D*N3IFC9+/ZT*S/O45QLRC

C> base43 -decode -hex < example.base43.txt
0100000001ac01d39c405d31d3d20b00254e84dce9838b9c280f3aa07bf77a1510d8f8779900000000fd4201004830450221009a4065d3b869f20b6e858e0722d9b511213e09dcf1b61072cccbff340c7f424e022034c42927a64fe323d8e8b76d99960322bf0664fdad9994939aedac74a32ca8c701483045022100dda3d5974ae1c06d9742c7aa5e2f789218054c60476f049300c7d4d0395819aa02201f484d7a2b4cc6186b23f54ea4099a728760d71fcc0c7a82bd056c6eaeacf3ab014cad5221020de4d18c5b852a3c1d1f1033a812b019c396b75cab2a248089b09632c7bbdda221024ee8ab3639ea02d7fac7e90078b16c06811573d7046cd06b5d1d8d7e50e0767a21025392159aaf967c2f7e1dca92b68d1b3abaf44a9d3903f7382e76f9f64e7bfa242102df269b98c7ea5bdec1aac268d6107b827163d3a0ca8bd3522279d14c46e1bf1a2103cfbf85d74dddf892b3b6f918fd36dab13cc904d9ba3c9306e9e25fe53ebde08155aeffffffff01131f0000000000001976a914e9cc1b59c97f860f5c629c23d93920da60648d0388ac00000000

C> type example.hex.txt
0100000001ac01d39c405d31d3d20b00254e84dce9838b9c280f3aa07bf77a1510d8f8779900000000fd4201004830450221009a4065d3b869f20b6e858e0722d9b511213e09dcf1b61072cccbff340c7f424e022034c42927a64fe323d8e8b76d99960322bf0664fdad9994939aedac74a32ca8c701483045022100dda3d5974ae1c06d9742c7aa5e2f789218054c60476f049300c7d4d0395819aa02201f484d7a2b4cc6186b23f54ea4099a728760d71fcc0c7a82bd056c6eaeacf3ab014cad5221020de4d18c5b852a3c1d1f1033a812b019c396b75cab2a248089b09632c7bbdda221024ee8ab3639ea02d7fac7e90078b16c06811573d7046cd06b5d1d8d7e50e0767a21025392159aaf967c2f7e1dca92b68d1b3abaf44a9d3903f7382e76f9f64e7bfa242102df269b98c7ea5bdec1aac268d6107b827163d3a0ca8bd3522279d14c46e1bf1a2103cfbf85d74dddf892b3b6f918fd36dab13cc904d9ba3c9306e9e25fe53ebde08155aeffffffff01131f0000000000001976a914e9cc1b59c97f860f5c629c23d93920da60648d0388ac00000000

C> base43 -hex < example.hex.txt
71OUKK$VH33.J1Y/K8Q8T3-F8X59N/YIO*LXY.7320F/5.KN$EG47LC*I1VP$S7FS2+.KAJR5:8$-MDQTMHA54/QT3R$JVX/WRDLONP/*TJLGIHRB.KNSGZWVUW9TOSOE6G1::..-NLQNJD-R1GNJ.HA7A1M.6CS:-60X9LR9XHHB6B1KLTX4T/EZN3$ZWW+J10-Z9QU-N9HHU$EV865ED$3JD$ZUJ6IA2Z:.WXKXTCK2:BMZFW3F+QI.GS54BN3*Q1T*3C1ESF0QA:ZOX1RLG/I/I1GPL:FPLRKAKH:KO4*U0YAK16-CGI-Z7A3EQAJ8Q484VA05FE7JO$-U.HBFWNFSFD8EGPJR*QV3YJD5SHA3BLWM+FR0*FS7M89S115/PU7:6-XW:EPL4/+7N2RFM/**Z6J*/--97OD2QWSLUE7G5F42ATP0SAV52U1GV+WZAJX$T0R:49QIDYJUKOXWX.$UUTR5596EOVK88E$ALJ-/MEML4883J5572D1-LRSXTRYL:X39U8QQ0XII09I5M3:13$U+B7V3S1+YUQM3:G+A/IH9+$.CHEOGE-3NX:OZ+H1D*N3IFC9+/ZT*S/O45QLRC

Seems OK.
The code is simple enough to be read and seen to be free of any malicious intent by almost anyone. I would suggest that any program used in connection with cryptocurrency should be compiled from source after inspecting the code. The go compiler is a free download from golang.org. Use go build to create a program from the source code.

> **Comments:**
> **username_0**: Wow. Dunno what to say? So cool. and thank you, so honored  

---

### Answer by username_0 on 2022-04-04. Score: 0

Another kind soul from Reddit:

There were some bugs in jacoblyles/base43js

I fixed them and made a simple html file with all the needed JS embedded.

<https://pastebin.com/WHk7iryz>

Save it to an html file and open it in a browser.

...

<https://www.reddit.com/r/Electrum/comments/ts03xj/electrums_custom_base43_looking_for_a_2way>


---

