<p>You're mentioning private keys, which are obviously not supposed to be shared while the purpose of QR code is to share information.</p>
<p>A QR Code is the transformation of a string into a 2D picture. It could be URL or whatever text. There is no specification for Bitcoin about QR Code.</p>
<p>If you'd like to share a public address for payment purposes, you just have to generate the QR Picture using the public address, some exchange applications support it.</p>
<p>Edit: QR Code generation libraries exists for most of programming languages.</p>

CC BY-SA 4.0
2023-03-10T17:37:03.427Z
Thanks for your answer. Its absolutely relevant. My view on the question is that the QR code I want  is for my own private utilization and never to be shared. I want this QR code to be printed on paper and then copied onto another material. Hence, the need for a QR code. I would certainly not send my private key over any website offering a QR code.
Fred Cailloux
CC BY-SA 4.0
2023-02-19T22:59:39.583Z
2023-02-27T19:28:24.940Z
2023-02-27T19:28:24.940Z
Maxime CATY
<p>You can encode a bitcoin public address to a QR code using whatever QR code generator is suitable for your language of choice. There is no reason not to trust existing QR code generators, as these are usually open source and you can study them to make sure that they don't do anything nefarious.</p>
<p>If you want to program your own QR code generator you can do so, but this has nothing to do with Bitcoin. A Bitcoin QR code is simply a QR code of a string that represents a Bitcoin public address.</p>
<p>As for the content of your QR code, if you encode the public string for your address that's usually enough. However, you may want to look at <a href="https://en.bitcoin.it/wiki/BIP_0021" rel="nofollow noreferrer">BIP 0021</a>. This proposes a URI standard that allows for other coins as well, and also lets you pass some more optional parameters such as a transfer amount, a label, and a message. Many wallets support this standard.</p>

CC BY-SA 4.0
2023-03-10T17:42:19.007Z
Yes, that is exactly what I want "If you want to program your own QR code generator you can do so, but this has nothing to do with Bitcoin."     But I haven't had any result so far searching how I can learn how to program it, which was my original question.
Fred Cailloux
CC BY-SA 4.0
2023-02-24T09:13:52.720Z
2023-02-24T09:13:52.720Z
alexg
<p>Not trusting those already available QR code generators available, I would want to program my own. The idea is to input a Bitcoin key ( private or public ) and the program would simply generate the corresponding QR code image as the output. Of course, this program would be run from an offline computer has to preserve a maximum security.</p>
<p>I haven't found any useful source of information about the procedure needed for my project. I've got fare experience in programming BASIC VBA C C++. I can probably figure out some Java or Python codes.</p>
<p>Essentially , I am looking for a tutorial showing the main procedure to input a Bitcoin key and construct the actual QR code.</p>

CC BY-SA 4.0
2023-02-18T16:38:15.777Z
Here is certainly a good start:  https://www.nayuki.io/page/qr-code-generator-library
Fred Cailloux
<development><algorithms><qrcode>
Where is a good source of information for procedural algorithm to program my own Bitcoin QR code generator?
Fred Cailloux
# Where is a good source of information for procedural algorithm to program my own Bitcoin QR code generator?

(Asked by: username_0 on 2023-02-18)

Not trusting those already available QR code generators available, I would want to program my own. The idea is to input a Bitcoin key ( private or public ) and the program would simply generate the corresponding QR code image as the output. Of course, this program would be run from an offline computer has to preserve a maximum security.

I haven't found any useful source of information about the procedure needed for my project. I've got fare experience in programming BASIC VBA C C++. I can probably figure out some Java or Python codes.

Essentially , I am looking for a tutorial showing the main procedure to input a Bitcoin key and construct the actual QR code.

**Tags:** development, algorithms, qrcode

> **Comments:**
> **username_0**: Here is certainly a good start:  https://www.nayuki.io/page/qr-code-generator-library  

---

## 2 answers

### Answer by username_1 on 2023-02-19. Score: 3

You're mentioning private keys, which are obviously not supposed to be shared while the purpose of QR code is to share information.

A QR Code is the transformation of a string into a 2D picture. It could be URL or whatever text. There is no specification for Bitcoin about QR Code.

If you'd like to share a public address for payment purposes, you just have to generate the QR Picture using the public address, some exchange applications support it.

Edit: QR Code generation libraries exists for most of programming languages.

> **Comments:**
> **username_0**: Thanks for your answer. Its absolutely relevant. My view on the question is that the QR code I want  is for my own private utilization and never to be shared. I want this QR code to be printed on paper and then copied onto another material. Hence, the need for a QR code. I would certainly not send my private key over any website offering a QR code.  

---

### Answer by username_2 on 2023-02-24. Score: 1

You can encode a bitcoin public address to a QR code using whatever QR code generator is suitable for your language of choice. There is no reason not to trust existing QR code generators, as these are usually open source and you can study them to make sure that they don't do anything nefarious.

If you want to program your own QR code generator you can do so, but this has nothing to do with Bitcoin. A Bitcoin QR code is simply a QR code of a string that represents a Bitcoin public address.

As for the content of your QR code, if you encode the public string for your address that's usually enough. However, you may want to look at [BIP 0021](https://en.bitcoin.it/wiki/BIP_0021). This proposes a URI standard that allows for other coins as well, and also lets you pass some more optional parameters such as a transfer amount, a label, and a message. Many wallets support this standard.

> **Comments:**
> **username_0**: Yes, that is exactly what I want "If you want to program your own QR code generator you can do so, but this has nothing to do with Bitcoin."     But I haven't had any result so far searching how I can learn how to program it, which was my original question.  

---

