tigtools

How to Generate a QR Code from a URL

Learn how to turn a URL into a scannable QR code, choose error correction, size and quiet zone, improve contrast, test prints, and choose static or dynamic.

By TIG Tools editorial teamPublished October 25, 20266 min read

A QR code can store a web address so someone can open it with a phone camera. To make one, prepare the exact URL, generate the code, then check its error correction, printed size, contrast, and quiet zone before sharing it.

The code only works as well as the link it contains. Test the destination and scan the finished design at its actual size, especially if you plan to print it or place it on packaging.

1. Prepare the URL

Start with the complete destination address, including https://. Avoid using a temporary preview link or a URL that requires you to be signed in. Open the address in a private browser window or on another device to check that it reaches the intended page.

If you want to measure visits from a particular poster, flyer, or event, add campaign parameters to the destination URL before generating the QR code. The UTM Builder can help assemble parameters such as utm_source, utm_medium, and utm_campaign. Check that the resulting URL opens the right page; the QR code will store that full address.

A shorter URL generally makes a simpler QR code, because it contains less data. If you control a short domain or redirect, you can use it, but keep the redirect reliable and under your control. Do not shorten a URL just to make the printed code smaller without first checking where it leads.

2. Generate the code

Enter the URL in the QR Code Generator, create the code, and download the image in a format suitable for your use. For print designs that may be resized, use the SVG download, which is a vector format. A raster image can work too, but enlarging a small raster can make its edges less clear.

Before using the downloaded image, scan it and confirm that it contains the URL you intended. A QR code does not show a person the destination in advance; some camera apps display a link preview, but behavior varies by device and app.

3. Choose an error correction level

QR codes use error correction so that data may still be recovered if part of the symbol is obscured or damaged. The four standard levels are commonly identified as L, M, Q, and H. Their approximate recovery capacities are 7%, 15%, 25%, and 30%, respectively. These figures describe error-correction capability, not a guarantee that the same percentage of the printed image can be covered in every situation.

Higher correction adds more code data, which can make the QR symbol denser for the same URL. A dense code may need to be printed larger to keep its individual squares, called modules, easy to distinguish. Use a moderate level for a clean, undamaged print. Consider a higher level if the code may be exposed to wear or if a design includes a small central logo, but test the result carefully. Error correction does not make poor contrast, a missing border, or a very small print size safe.

If you are unsure which level to choose, start with the generator's default, M. Avoid adding a logo or decorative effects unless you can scan the finished version at its intended size and from different phones.

4. Set the size and preserve the quiet zone

The physical size depends on how far away people will scan from, the amount of data in the URL, the print quality, and the capabilities of the scanning device. There is no single size that works for every poster, label, or screen. A code scanned from arm's length can be smaller than one people must scan from across a room. When in doubt, make it larger and test a real-size proof.

Keep the modules sharp and square. Do not stretch the image vertically or horizontally, and avoid resampling it into a blurry, low-resolution graphic. If you resize a raster image, use an export size appropriate for the final print rather than enlarging a tiny file at the last step.

Leave a clear blank margin around all four sides. This margin is called the quiet zone and should be at least four modules wide. A module is one small square in the QR pattern. The margin must be clear of text, borders, images, and other marks; a page edge or colored background does not automatically count as a quiet zone. Keep the surrounding area visually distinct from the code itself.

5. Use strong contrast

A conventional QR code uses dark modules on a light background. This gives scanners a clear difference between the dark and light areas. Avoid low-contrast combinations, gradients across the code, transparent backgrounds that may blend into a surface, and reflective or patterned materials that interfere with the image.

If you use colors, keep the modules noticeably darker than the background and check the printed result under the lighting where it will be used. Inverting the usual light-and-dark arrangement may work with some scanners, but can be less dependable across devices. A standard dark-on-light design is the safer choice. The Contrast Checker can help compare colors, but a screen-based color check does not replace scanning the actual print.

6. Test the finished code

Do not stop after scanning the original download. Test the design after it has been placed in a layout, resized, printed, or applied to its final surface.

Use this checklist:

  • Scan it with more than one phone or camera app if possible.
  • Check it at the distance and angle people are likely to use.
  • Try it in the lighting and environment where it will appear.
  • Confirm that the decoded URL is correct and that the destination loads.
  • Check the quiet zone, contrast, sharpness, and any logo or decoration.
  • For print, scan a physical proof at the intended size before producing a large batch.

A code that scans on a large monitor may fail when printed small, placed behind glass, or viewed in dim light. Testing the actual output catches problems that a preview cannot.

Worked example: a QR code for an event flyer

Suppose you are making a flyer for a spring market and want to measure visits from the printed flyer. First, choose the event page, such as https://example.com/spring-market. Add campaign information with the UTM Builder, using values such as flyer for the source, print for the medium, and spring-market for the campaign. The resulting URL might look like this:

https://example.com/spring-market?utm_source=flyer&utm_medium=print&utm_campaign=spring-market

Open that address to verify the event page loads, then paste it into the QR generator. Use a suitable error-correction setting and create the image. Place it on the flyer with a clear border of at least four modules. Print a proof at the flyer’s final size and scan it from a normal reading distance. Confirm that the scan opens the event page and that the campaign parameters remain in the address.

If the code is difficult to scan, enlarge it, simplify the URL if practical, improve contrast, or remove nearby design elements. Do not solve a scan problem by removing the quiet zone.

Static vs. dynamic QR codes

The TIG QR Code Generator creates static codes. A static QR code encodes the destination URL itself. Once generated, its encoded address does not change. If the page moves, the printed code will keep pointing to the old address, so you would need to replace the code or make the old URL redirect to the new page. A static code can be a good fit when the destination is stable and you want the code to work without relying on a QR management service.

A dynamic QR code usually encodes a short URL that redirects through a service. The service can allow the destination to be changed after printing and may provide scan reporting, depending on its features and terms. The printed code itself still contains the same redirect address; the service changes where that address leads. This approach depends on the redirect remaining active, so check any account, access, and service requirements before putting a dynamic code on materials that must last.

For either type, the code does not guarantee that the destination site will remain online. Use a URL you control where possible, and consider how long the printed material will be in circulation before choosing a redirect approach.

Summary

  • Use the complete, tested URL; add campaign parameters first if you need them.
  • Choose an error-correction level with the code’s density and print conditions in mind.
  • Keep the code sharp, high contrast, large enough to scan, and surrounded by a four-module quiet zone.
  • Test the final design at its actual size on multiple devices when possible.
  • Use static codes for fixed destinations and dynamic redirects when you need to change the destination later and can maintain the service.

Try it now

Use the QR Code Generator for free, right in your browser. No sign-up, and your files stay on your device.

Open QR Code Generator

More guides