Generating Truly Free QR Codes
Hello! You're in the right place if you need to create a QR Code. Simply paste the URL to which you want the QR code to link to, and your QR code will be generated in seconds.
How this Works
The Google Charts API supports a few query-string parameters that we can utilize to determine the type of chart we want to create.
Chr: This parameter allows us to tell Google we want to create a QR code by passing through the parameter “qr.”
Chs: This parameter allows us to tell Google how large we want the QR code to be. Represented in horizontal and vertical dimensions. 500x500 will generate a 500px wide QR code.
Chl: This parameter allows us to tell Google where we want the QR code to link to.
After URL encoding our Link URL, we end up making a request to the Google Charts API with a URL that looks like this:
https://chart.googleapis.com/chart?cht=qr&chs=500x500&chl=https%3A%2F%2Fwww.google.com
Google will then create and render the QR code on the page; you can download it and use it wherever needed.
Things to Consider
QR codes are generated in one of two ways. This above example links the user directly to the URL we enter. If we enter https://google.com, the user goes directly from the QR code to https://www.google.com.
Another approach is to implement some “middleware”. Think of middleware as an automated receptionist. The QR code would instead first link to middleware/receptionist, which would then identify the intended URL we should ultimately direct the user to.
The benefit of the middleware approach is that we can then update the intended URL redirect over time. Let’s say we have a restaurant and use a QR code for customers to view our menu. Updating the URL through our middleware whenever we update our menus allows us to use the same QR code to display the new menu.
An example of this middleware approach is Bitly's Dynamic QR Code Generator. With the Pro plan, you can create and manage various QR Codes over time, allowing you to change the QR Code redirect URL over time. At around $15/mo you can create 50 Dynamic QR Codes.
APIs in a Nutshell
APIs enable developers and users to interact with a tool or service. APIs are not always complex. This example of the Google Charts API illustrates how simple an API can be while still being very flexible in what it can do and provide users.
Photo Credit: Adobe Firefly.