QR code: Encode and Decode QR code on linux command line

QR(Quick response) code as defined by google is

A machine-readable code consisting of an array of black and white squares, typically used for storing URLs or other information for reading by the camera on a smartphone.

Here is how we can create QR code in linux using command line.

Using command line:

To create QR code using command line we will need to install the package libqrencode3

After successful install of the package we can encode any string of characters, text,url,numbers, into a QR code as shown below.

Let us say we want to encode the string "Hello" into a QR code.

This will creat a hello.png file in the QR format as shown below.

To be able to decode a QR code on the command line we can use the package zbar.

Once the package is installed we can use the command zbarimg to read a QR encoded file

To decode the hello.png QR we created above

Thus we can see that the QR-Code has been correctly recognized as "Hello "

Useful links:


  1. It is a good way to create QR code using command line. And it is quite easy to decode QR Code.
    QR Code generator, QR Code reader

  2. Generating Qrcode on linux is very useful, but the most useful is the process of generate Qrcode.

  3. Ignore the two previous comments for commercial (paid for) applications. qrencode and zbarimg are THE solution for command line. Thanks for the zbar-tools link which ws new to me and just what I was looking for. And they're both FREE :-)

  4. Interesting and interesting information can be found on this topic here profile worth to see it. Bitcoin QR Code Generator