eSIM QR code

Also known as: eSIM activation code

On this page 8

An eSIM QR code is a two-dimensional barcode that carries an eSIM activation code: a short text string telling a device which provisioning server to contact and which subscriber profile to request. In the SIM & eSIM domain of telecommunications, it is the most common way a consumer moves from buying a mobile plan to having a working downloadable SIM profile on an embedded chip.

The QR code itself contains no subscriber credentials. It is a pointer and a one-time claim ticket. The secret keys that authenticate the device to the mobile network arrive later, inside an encrypted profile package that only the target chip can decrypt.

What the activation code inside the QR code contains

The QR code encodes a structured activation code defined by the GSMA consumer Remote SIM Provisioning specification, commonly referenced as SGP.22. A typical string looks like LPA:1$smdp.example.net$K2-3XYZ-ABCDE, where each field is separated by a dollar sign and read by the phone in a fixed order.

The following table breaks the string into its fields and explains the role of each one during activation.

FieldExample valuePurpose
Format prefixLPA:1Identifies the string as an activation code, version 1
SM-DP+ addresssmdp.example.netFully qualified domain name of the profile server
Matching IDK2-3XYZ-ABCDELinks the request to one prepared profile order
SM-DP+ OIDOptional object identifierIdentifies the server certificate when needed
Confirmation flag1 or absentSignals that a separate confirmation code is required
Fields of a consumer eSIM activation code

The Matching ID is the critical element. The operator generates it when it reserves a profile for a specific customer order, and the SM-DP+ server uses it to find that reservation. Without a valid Matching ID the server has nothing to release, which is why a generic QR code cannot activate service.

How scanning the code leads to an installed profile

Scanning starts a secured download session between the phone, the provisioning server and the embedded chip. The software that drives the process is the Local Profile Assistant, or LPA, which is part of the operating system on consumer phones, tablets and smartwatches.

  1. The LPA decodes the QR code and extracts the SM-DP+ address and Matching ID.
  2. The phone opens a TLS connection to the server over Wi-Fi or another active data link.
  3. The eUICC and the server perform mutual authentication using certificates issued under the GSMA certificate hierarchy.
  4. The server checks the Matching ID and, if configured, asks the user for a confirmation code.
  5. The server builds a Bound Profile Package encrypted for that specific eUICC and sends it.
  6. The eUICC decrypts and installs the profile, and the user enables it as a cellular line.

Because the package is bound to one eUICC, an intercepted download is useless on another device. The step that requires the most care is therefore not the radio link but who holds the QR code before it is first used.

Single-use behavior and code lifecycle

An eSIM QR code is normally valid for one successful download. After the profile has been delivered, the server marks the order as consumed, and scanning the same code again returns an error. Operators also set an expiry window, which commonly ranges from a few days to several weeks depending on the carrier.

This table maps the usual server-side states of an activation order to what the user experiences when scanning.

Order stateWhat scanning doesUsual remedy
ReleasedDownload and installation succeedNone needed
DownloadedError stating the profile is already usedRequest a new code from the operator
ExpiredError or no matching order foundReissue the profile order
CanceledOrder not foundContact customer support
Deleted on deviceOld code still rejectedOperator must prepare a fresh profile
Typical activation order states

A frequent misconception is that a deleted eSIM can be restored by rescanning the original code. In most deployments it cannot, because the profile was consumed on first download. Some operators permit profile reuse for the same device, but this is a carrier policy rather than a property of the standard.

QR codes compared with other activation methods

The QR code is only one of several entry points into the same provisioning flow. Phones can also receive a profile through manual code entry, an operator app, discovery service lookups or a device-to-device transfer, and each method suits different situations.

MethodHow the device gets the orderBest suited to
QR code scanCamera reads the activation codeRetail stores, printed letters, email delivery
Manual entryUser types the SM-DP+ address and Matching IDScanning impossible on the same screen
Carrier appApp passes the order to the LPA directlySelf-service sign-up on the phone itself
SM-DS discoveryPhone polls a discovery server for pending eventsActivation without any code to handle
eSIM transferOld phone hands the line to the new phoneDevice upgrades within one ecosystem
Ways to start an eSIM download

A practical limitation of the QR method is that a single phone cannot easily scan a code displayed on its own screen. Modern operating systems address this by letting users import a code from an image or by offering the manual entry fields, which accept exactly the same data.

Security risks and safe handling

An unused eSIM QR code should be treated like a physical SIM card in an envelope. Anyone who scans it first, on any compatible device, receives the subscriber line, including incoming calls and SMS one-time passwords. This makes leaked codes a vector for SIM swap fraud.

The table below lists common handling mistakes, why they matter and how operators and users can reduce the exposure.

MistakeConsequenceCountermeasure
Posting the code in a screenshotThird party can download the lineShare codes only through private channels
Emailing codes without extra checksMailbox compromise exposes the numberRequire a confirmation code sent separately
Scanning a code from an unknown senderDevice may join an unwanted planVerify the SM-DP+ domain matches the operator
Keeping used codes as a backupFalse sense of recoverabilityRecord the account details instead
Reissuing codes without identity checksSocial engineering takes over accountsApply strong identity verification
Handling mistakes and countermeasures

Operators increasingly bind orders to a device identifier, such as the EID of the target eUICC, so that the profile is released only to the intended hardware. This EID binding largely neutralizes code theft, although it requires the customer to provide the EID during purchase.

Where QR activation fits in consumer and IoT provisioning

QR activation belongs to the consumer model, in which a person with a screen approves each download. Machine-to-machine devices historically used the separate SGP.02 model, which pushes profiles from a server-driven platform, and the newer SGP.32 specification adapts consumer-style flows to headless IoT devices that cannot scan anything.

Within the consumer model, the QR code remains popular because it is operator-neutral, works with printed materials and requires no installed app. Its weakness is the manual step: travel eSIM sellers, retail staff and support agents still spend significant time helping users scan, confirm and label new lines correctly.

Stripped to the essentials

An eSIM QR code works like a collection ticket for a SIM card. The ticket does not contain the SIM itself. It tells your phone which counter to visit and which order number to collect.

When you scan it, the phone contacts the operator’s server, proves it is a genuine eSIM device and receives a locked digital SIM that only that phone can open. After that, the ticket is spent. Keep an unused code private, because whoever scans it first gets your phone number.

Where it is applied

A business traveler lands in a foreign airport and buys a ten-day data plan online. The seller emails a QR code and a separate four-digit confirmation code. Over the airport Wi-Fi, the traveler opens the cellular settings, chooses to add an eSIM and scans the code from a laptop screen.

The phone contacts the SM-DP+ server, asks for the confirmation code and downloads the profile in under a minute. The traveler labels the new line as data only, keeps the home number active for calls, and has working mobile data before leaving the terminal. A day later, a colleague asks to reuse the same QR code and discovers that it is rejected as already consumed, so the colleague buys a separate plan.