How Do QR Codes Work? The Surprisingly Clever Story Behind Every Scan
25 June 2026
Explore the technology behind QR codes, from how they work and why they were invented to how they power seamless digital payments and trusted government services in Singapore.

Picture yourself at a hawker centre. You take out your phone and point it at a small square of black-and-white dots on the table. Moments later, the menu appears on your screen. In those few seconds, your device has detected the code’s orientation, decoded its data, corrected potential errors, and opened the webpage linked to it.
QR codes have become so commonplace that they often fade into the background. Yet the story behind their invention, the technology that makes them work, and the role Singapore played in bringing them into everyday life is far more fascinating than that unassuming square might suggest.
What is a QR code?
The QR code is basically a barcode on steroids. (In fact, QR stands for “Quick Response”.) While the barcode encodes information horizontally, the QR code encodes it both horizontally and vertically. This means it can hold over a hundred times more information.
Three structural components make up the code. The first is the three-square "eyes" positioned in the three corners of the code. The second is the data module grid, the field of small black-and-white squares, which encodes the content. The third is the quiet zone, the plain white border surrounding the whole code, which signals where the code ends, and everything else begins.
Working together, these components enable QR codes to be scanned quickly and reliably from different angles, at varying distances, and even in less-than-ideal lighting conditions, ensuring that a webpage loads with just a simple scan.
What makes QR scanning so seamless
When you scan QR codes with your phone, the process moves through several distinct steps in under a second. The camera locates the three corner markers first, establishing orientation. It then maps the data grid, reads each square as either a one or a zero and reassembles those binary values into a data string. Next, it decodes that string into whatever the code contains: a URL, a payment instruction, a contact card, or a block of plain text.
Surprisingly, up to 30 per cent of a QR code can be physically damaged, covered, or missing, and your phone can still decode it correctly. This is a deliberate design choice called error correction, in which the code stores redundant copies of its data across different parts of the grid.
It all started in a car parts factory
Who created QR codes? The design traces back to a subway window, game of Go, and a Japanese engineer named Hara Masahiro, who set out to solve one problem: barcodes which held too little data for a busy car parts assembly line.
His first attempt, a two-dimensional square barcode, worked in isolation but failed when printed alongside other text as scanning machines could not distinguish it. Staring out of a subway window, Hara noticed how skyscrapers stood out against the skyline. That contrast gave him the idea for the three corner squares: with their specific black-to-white ratio, scanners could instantly identify and orient the code regardless of what surrounded it.
The error correction system came from watching a game of Go. Hara noticed a piece's intended position was usually clear even when its placement was slightly off. A QR code could work the same way: store redundant data across the grid, and a partial read could still produce a complete result.
Denso Wave released the format as an open standard in 1994, and it spread fast. From a factory in Japan, QR codes moved into logistics, retail, and eventually the daily infrastructure of cities worldwide.
How QR codes became an integral part of everyday life in Singapore
Digital payments (SGQR)
Walk into a typical hawker centre before 2018, and a stall might have four or five separate QR codes side by side, one per payment app. For customers, this meant figuring out which code to scan. For stall operators, managing multiple payment schemes added unnecessary complexity and could discourage the adoption of digital payments.
To simplify the experience, SGQR was developed by the Infocomm Media Development Authority (IMDA) and the Monetary Authority of Singapore (MAS). It consolidated multiple payment schemes into a single QR code that works across platforms such as GrabPay and PayNow. The first unified QR code initiative of its kind globally, SGQR made digital payments more convenient for both consumers and merchants.
Today, that single QR code displayed at hawker stalls, neighbourhood shops, and retail counters is a small but powerful example of how thoughtfully designed digital infrastructure can make everyday transactions simpler and more seamless.
Accessing government services: Singpass & Gov QR Payment
QR codes have also made it easier for citizens to access and transact with government services. One example is Sign with Singpass. By scanning a QR code and authenticating with Singpass, users can securely sign documents and agreements online, eliminating the need to be physically present or go through the hassle of printing, signing, and scanning forms.
Beyond digital signatures, QR codes are also commonly used for authentication across government digital services. Many government platforms and websites support Singpass login, allowing users to verify their identity by simply scanning a QR code with the Singpass app instead of entering passwords manually.
Building on the convenience of QR-enabled transactions, GovTech introduced Government QR Payment (Gov QR Payment). Instead of manually entering payment details, citizens can simply scan the QR code on a physical or electronic bill to make a secure payment. The initiative supports the Digital Government Blueprint's vision of delivering end-to-end digital services that make government transactions more convenient and digital payments easier to use.
Rather than developing a separate mobile application, GovTech integrated Gov QR Payment with preexisting banking and e-payment apps that already support QR code scanning. This required close collaboration with financial institutions such as DBS, OCBC, UOB, and electronic payment service provider, NETS, allowing citizens to pay using apps they were already familiar with.
Today, Gov QR Payment is scaled and used across a range of government services, demonstrating how a simple QR code can make interactions with government faster, more seamless, and more accessible.
Distributing government benefits: RedeemSG
From CDC Vouchers to Climate Vouchers, the Singapore Government regularly introduces schemes to help citizens manage living costs and encourage the adoption of positive behaviour. To support these initiatives, agencies need a trusted and scalable way to create, distribute, and track voucher redemptions.
RedeemSG was created so that citizens can easily claim and redeem government-issued vouchers, while participating merchants can accept them as payment, all with the help of QR codes.
When making a purchase, citizens generate a QR code from their voucher wallet, which merchants simply scan to redeem the corresponding amount. This removes the need for physical vouchers and streamlines the redemption process for both citizens and businesses.
Today, RedeemSG powers voucher campaigns on a national scale. To date, the platform has facilitated over $204 million worth of transactions across more than 19,000 merchants. In addition, 98% of Singaporean households have claimed at least one voucher through RedeemSG, with 21 voucher campaigns launched and more than 1.2 million vouchers claimed in 2023 alone.
Mitigating QR phishing risks: Go.gov.sg & ScamShield
A QR code hides its destination until it is scanned, and creating one takes only seconds. While this makes QR codes incredibly convenient, it also makes them an attractive tool for scammers.
One common tactic is QR phishing, or "quishing". A malicious QR code can redirect users to a convincing imitation of a legitimate website designed to steal login credentials, personal information, or payment details. In some cases, scammers go a step further by placing fraudulent QR code stickers over legitimate ones, causing unsuspecting users to be redirected to malicious websites.
To help citizens identify trusted government links, GovTech developed Go.gov.sg. Short links and QR codes on the platform can only be created by authorised public officers. When users scan a Go.gov.sg QR code, they can be assured that they are directed to verified government websites, reducing the risk of phishing attacks. The platform also includes a brief transition page that displays the destination URL before redirecting users, giving users an opportunity to verify the link before proceeding.
Three practical habits help: check unfamiliar codes for tampering before scanning, read the URL before tapping through, and never enter credentials on a page reached via an unexpected scan. If something looks off, report it on ScamShield.
What comes after the QR code?
The format itself continues to evolve. Dynamic QR codes, which can change their destination after the physical code has been printed, are already in active commercial use. This flexibility creates useful applications and, predictably, new risks: a code that pointed somewhere legitimate when it was printed may not do so later.
NFC (Near Field Communication) chips, the technology behind contactless payment taps, are beginning to replace QR codes in contexts where security and precision take priority over cost.
As time passes, Singpass biometrics and increasingly sophisticated digital identity infrastructure are likely to take over transactions that require a higher degree of certainty about who is transacting. But for everyday interactions, the little square is not going away anytime soon.
