Introducing QR-Gram : Combine Nonograms and QR Codes for Fun


QR codes and Nonograms are both entertaining ways to engage with puzzles and messages. A QR code is a two-dimensional barcode that contains information that can be scanned by a smartphone's camera. A Nonogram, on the other hand, is a grid puzzle in which players must fill in the correct squares to reveal a hidden image. In this article, we will introduce QR-Gram, a Python code that transfers a string into a QR-code, which is then encoded into a Nonogram.

How QR-Gram Works

QR-Gram is a quick and dirty Python code that takes a string input and transforms it into a QR code. The code then converts the QR code into a Nonogram. To access the message or website encoded in the QR code, the player must first fill in the Nonogram by correctly guessing which squares to fill in. The longer the message, the more challenging the Nonogram becomes.

Getting Started with QR-Gram

To use QR-Gram, you must first clone the repository by running the following commands in your terminal:

git clone https://github.com/azerty-labs/QR-Gram.git
cd QR-Gram/
python -m venv venv
source ./venv/bin/activate
python pip install itertools pyqrcode argparse

Once you have cloned the repository, you can start the program by running the following command in your terminal:

python qr-gram.py

To encode a message or website, simply type it after the program name as an argument. For example, to encode the message ":)", run the following command:

python qr-gram.py ":)"

QR-Gram will output the Nonogram in your terminal and also save it as a CSV file named my-nono.csv for easy integration with Excel and Word. For instance :


Help with QR-Gram

If you need help with QR-Gram, you can use the -h command to get some guidance. For example, running the following command will display the available options and arguments:

python qr-gram.py -h


QR-Gram was inspired by a challenge posted on Reddit's r/dailyprogrammer, as well as the work of Reddit user TheBlackCat13. The program uses the PyQRCode package to generate the QR code.


QR-Gram is a fun and unique way to encode messages and websites. By combining QR codes and Nonograms, QR-Gram offers a new way to engage with puzzles and hidden messages. Try it out for yourself and see how challenging your Nonograms can become!