A QR code is a square, black-and-white barcode that stores information such as a web address, Wi-Fi details or contact card. When you point your phone's camera at it, the phone decodes the pattern in a split second and offers to open the link or action inside. "QR" stands for Quick Response.
This guide explains what is inside those squares, how to scan one and how to make your own.
Where QR codes came from
QR codes were invented in the 1990s by Denso Wave, a Japanese company that needed a faster way to track car parts in factories. Ordinary barcodes, the striped kind on supermarket products, can only hold a short number and must be read in one direction. A QR code is two-dimensional: it stores data both horizontally and vertically, so it can hold far more and be read from almost any angle.
Denso Wave chose not to enforce its patent, and the format became an open international standard, which helped QR codes spread everywhere.
How a QR code works
A QR code looks random, but every part has a job. If you look closely, you can spot most of these pieces:
- Finder patterns: the three large squares in the corners. They tell the scanner where the code is and which way up it is.
- Alignment and timing patterns: smaller squares and dotted lines that help the camera correct for tilt, curves and distance.
- Data modules: the many small black and white squares. Each one is a bit of information, and together they encode your text or link.
- Error correction: extra, carefully calculated data that lets the code still scan even if part of it is dirty, scratched or covered by a logo.
- Quiet zone: the empty white margin around the code. Without it, scanners struggle to find where the code starts.
QR codes come in different sizes, called versions, from a small 21 by 21 grid up to a large 177 by 177 grid. The more data you put in, the more modules the code needs, and the denser it looks. That is why a short link produces a cleaner, easier-to-scan code than a long one.
What a QR code can store
At its core, a QR code just stores text. Your phone then decides what to do with that text based on its format. Common types include:
- A website address (URL), which opens in your browser
- Wi-Fi network name and password, which lets you join without typing
- A contact card (vCard), which you can save straight to your address book
- A phone number, SMS or email with a pre-filled message
- Plain text, such as a serial number or a short note
- Payment details, such as a Thai PromptPay QR
How to scan a QR code
Most modern phones scan QR codes without any extra app. Here is the usual process:
- Open your phone's camera app.
- Point it at the QR code so the whole square, including its white border, is visible.
- Hold steady for a moment. A notification or banner appears showing the link or action.
- Read what it says before tapping it.
- Tap only if the destination looks right.
If your camera does not react, check your settings for a QR scanning option, or use a scanner built into apps such as your bank app or messaging app. You can also scan a QR code online from a screenshot or photo. The QR-TH scanner reads the code in your browser and shows you where it leads before anything opens, which is handy when you are unsure about a code.
What QR codes are used for
Because they are free to create and easy to scan, QR codes have spread into everyday life. Some of the most common uses are:
- Menus and ordering in restaurants and cafés
- Payments, including bank transfers and e-wallets
- Sharing Wi-Fi with guests without reading out a long password
- Business cards that save your contact details in one tap
- Marketing, linking posters, flyers and packaging to a website or offer
- Tickets and boarding passes for events and travel
- Product information, manuals and warranty registration
Static and dynamic QR codes
A static QR code stores the final content directly in the pattern. It works forever and needs no service behind it, but you cannot change it once it is printed. A dynamic QR code stores a short link that redirects to your real destination. You can change the destination later and see how many times the code was scanned, without reprinting anything.
If you are printing something that will be around for a while, like a menu or a shop sign, dynamic codes are usually the more flexible choice. Our guide to static vs dynamic QR codes explains when to pick each one.
Are QR codes safe?
A QR code itself is just data, and it cannot harm your phone simply by being scanned. The risk is where it sends you. Because people cannot read a QR code with their eyes, scammers sometimes stick fake codes over real ones or send them in emails, hoping you will open a fake login or payment page.
A few habits keep you safe:
- Always read the link preview before you tap
- Be wary of codes stuck on top of other codes, especially on parking meters and payment signs
- Never enter passwords or card details on a page you reached from an unknown QR code
- Check the receiver name before confirming any QR payment
To learn the warning signs, read our guide to QR code scams and quishing.
How to make your own QR code
Creating a QR code takes about a minute:
- Choose what you want the code to do, such as open a link, share Wi-Fi or save a contact.
- Enter the details in a QR code generator.
- Pick static or dynamic, and adjust colours or add a logo if you like.
- Download the image and test it with two or three different phones.
- Print it with a clear white border and at a size people can scan comfortably.
With the free QR code generator on QR-TH you can choose from 29 QR types, and visitors who scan your code see no ads after scanning.
FAQ
Do I need an app to scan a QR code?
Usually not. Most current iPhone and Android phones read QR codes straight from the camera app. If yours does not, an online scanner or the scanner inside many banking and messaging apps works too.
Do QR codes expire?
A static QR code never expires because the content is stored in the pattern itself. A dynamic QR code keeps working as long as the service that runs its short link keeps it active.
Can a QR code give my phone a virus?
Scanning alone does not infect a phone. The danger comes from visiting a malicious website or installing an app the code points to, which is why you should always check the link before opening it.
How much information can a QR code hold?
The largest QR codes can hold a few thousand characters, but in practice it is best to keep content short. Short links make smaller, cleaner codes that scan faster.
Now that you know what a QR code is, the best way to understand it is to make one. Try the free QR code generator on QR-TH, scan the result with your phone, and see how it works for yourself.