QR Codes Are Back

Learn to make QR codes in JavaScript

Jump straight to the challenge by clicking the button below. You will be linked to a Code Sandbox with one failing unit test. Read the README instructions and make the test pass to complete the challenge.

More info on how to complete challenges here.

Solve Challenge

Code Sandbox tips:

  1. Sign in and fork the sandbox to edit the code.

  2. The terminal you will be presented with will be read only. Simply click the plus icon in the Code Sandbox terminal to open a new terminal window where you can run commands. This will enable you to run “npm run test“ .


With the recent pandemic QR codes have enabled businesses around the world to keep operating in a safe way.

Many software engineers are having to get back up to speed with the technology that appeared to be on the way out.

With that in mind, this challenge will teach you how to create your own QR codes in JS.


Using the node-qrcode libary, generate a valid QR code.

Acceptance Criteria

1. Scanning the QR must produce the text "you solved the challenge"

2. QR code is saved to disk with the file name "qr-output.png"

3. The QR code dark colour must be dark red (#bf1313) and the light colour must be light blue (#b5d8f5)

There is a single failing unit test. run "npm run test" from the terminal. Make it pass.

Solve Challenge

Good luck.

Working solution