QR Code API
QuickChart supports QR code generation. Generate a QR code like this:
https://quickchart.io/qr?text=Here's my text
QR code parameters
Build your customized QR code using the following query parameters. You may also use the web-based QR code builder.
|Parameter Name||Description||Required?||Default value|
|text||Content of the QR code (can be a URL or any other string)||Yes|
|format||Format of QR code, either png, svg, or base64||png|
|margin||Whitespace around QR image||4|
|size||Width and height dimension of the image||150|
|dark||Hex color code of "dark" QR grid cells||000000 (black)|
|light||Hex color code of "light" QR grid cells||ffffff (white)|
|ecLevel||Error correction level (L, M, Q, H)||M (H if center image is present)|
|centerImageUrl||URL of image to show in the center. Must be URL-encoded.|
|centerImageSizeRatio||How much space to take up, between 0.0 and 1.0||0.3|
|centerImageWidth||Width of center image in pixels|
|centerImageHeight||Height of center image in pixels|
Customizing QR code appearance
To customize the color of your QR code, use
light. The parameters must be hex color codes (e.g.
light=ffffff). For a transparent background, set
Set the whitespace around QR image in modules with query parameter
margin (defaults to 4),
size determines the pixel dimensions of the image (defaults to 150), and error correction level with
ecLevel (valid values: L, M, Q, H).
The QR endpoint produces a PNG image by default. You may optionally set the query parameter
format=svg for SVG format.
Here's the same code as above but URL encoded with slimmer margins, more error protection, colors, and in SVG format:
Images in QR codes
You may include an image centered in your QR code by using the
centerImageUrl parameter. Note that the URL must be URL-encoded. PNG and JPG images are supported.
https://quickchart.io/qr?text=Here's my text¢erImageUrl=https://cdn-icons-png.flaticon.com/512/1389/1389234.png
To set width/height, use
centerImageSizeRatio. This ratio should be a float between 0 and 1. It determines how much space the center image takes up.
https://quickchart.io/qr?text=Here's my text¢erImageUrl=https://cdn-icons-png.flaticon.com/512/1389/1389234.png¢erImageSizeRatio=0.75
Alternatively, you can specify width and height in pixels using
You should always test the QR code after overlaying an image. This is because an image can potentially block critical portions of the QR code. You can guard against this by making sure the image covers less than ~30% of the available area.
Bulk QR code generator
The API can generate bulk QR codes, but if you're looking to generate codes quickly, try our web-based bulk QR code generator.