Generating QR Codes (using Google Charts API)03 Jan 2017 - 1 min read
EDIT: Charts API has been deprecated by Google
QR Code (abbreviated from Quick Response Code) 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.
As an example, here’s the QR Code containing link to the homepage of this site:
The Google Chart API is a tool that lets people easily create a chart from some data and embed it in a web page. Google creates a PNG image of a chart from data and formatting parameters in an HTTP request.
Here’s the general format:
|chl||The content to encode. Make sure the content is HTML encoded, e.g.
|chs||Dimensions of the generated QR Code image as
See Google Developer Site for more info.
So, here’s a CodePen sample: