Read a Matter or HomeKit setup code

Paste the text inside a Matter QR code, a manual pairing code, or a HomeKit setup payload. You get the code to type into Apple Home or Google Home, what the device says about itself, and a label you can print. Everything runs in your browser, and nothing you paste leaves it.

What a Matter QR code carries

The QR code on a Matter device is a short piece of text, MT: and about twenty characters. Packed inside are the six values a Home app needs to find the device and prove it has the right one.

Vendor and product
Two numbers. The vendor ID is assigned by the Connectivity Standards Alliance, the product ID by the maker. Together they name the model, which is how a Home app knows what it is pairing before the device says a word.
Discriminator
A 12 bit number the device advertises over Bluetooth or the network while it waits to be paired. The Home app uses it to pick your device out of several that are waiting at once. The manual pairing code carries only its top four bits.
Passcode
An eight digit number, up to 99,999,998, that the device and the Home app both know. It is the proof of possession: without it, nothing nearby can take over the device. Codes made of one repeated digit, 12345678 and 87654321 are never issued.
Commissioning flow
Standard means the device is ready to pair as soon as it has power. User intent means you press a button or follow a step first. Custom means the maker's own app has to take part. A device on either of the last two prints a longer 21 digit code with the vendor and product in it.
Discovery
How the device waits to be found: over Bluetooth LE, already on your Wi-Fi or Thread network, as its own Wi-Fi access point, over Wi-Fi public action frames, or by an NFC tap.
The manual pairing code
The 11 digits printed beside the QR code, grouped 4, 3 and 4. They carry the passcode and the short discriminator, and the last digit is a check digit, so a typo is caught before the Home app goes looking. Apple Home, Google Home, Alexa and SmartThings all accept it when the QR code will not scan.
And a HomeKit code
A HomeKit QR code is older and simpler: X-HM:// and 13 characters that hold the eight digit setup code, the accessory category and whether it pairs over Wi-Fi or Bluetooth. The eight digits printed beside the house mark are all the Home app needs.

Questions

Can I turn an 11 digit code back into the QR code?
No. The manual code leaves out the vendor, the product and most of the discriminator, so no one can rebuild the QR code from it. You do not need to: every Home app has a place to type the code instead of scanning.
The code fails the check digit. What now?
At least one digit was read wrong. On a worn label 0 and 8, 1 and 7, 3 and 8, and 5 and 6 are the usual mix ups. If one digit is doubtful, try its likely swap: the check digit catches any single wrong digit, so the first code that passes is the one to try in the Home app. If two or more are unreadable, a guess can pass the check and still be another device's code, and the Home app will not pair; then you need the QR code, the maker's app or a reset.
Is the code I paste sent anywhere?
No. The page does its arithmetic in your browser and makes no network request with what you type. You can load it, go offline and it still works.
Can I print a replacement label?
Yes. Decode the code and press Print this label. From QR text, a Matter label prints with its QR code and the manual code, and a HomeKit label with the house mark, the code and its QR code. From a typed code alone, the label prints with the code. Stick it on the device, or inside the box lid.
I have only the 8 digit HomeKit code. Can I get a QR code?
Not from the digits alone: the QR code also names the accessory category and its pairing transport, which the digits do not carry. Type the eight digits into the Home app instead; it accepts them for every accessory.
The code is right, but a second app will not pair the device
The printed code works at first setup and after a factory reset. Once a device is in one ecosystem, that app hands it to the next one. In Apple Home, open the accessory's settings and choose Turn On Pairing Mode for a temporary code. In Google Home, open the device's settings, then Linked Matter apps and services, and Link apps and services; it can hand the device over without a code. In Alexa, open the device, then Other Assistants and Apps, and Add another, for a code that lasts 15 minutes. In SmartThings, open the device's menu, then Share with other services, and Share device. The code each one shows is not the one on the label.
Where was the code to begin with?
On the device, on its box and in its quick start card, and for some brands inside their app. Where setup codes are printed goes through each place.

Next time, have it on your phone

SmartHomeQR scans each label once and keeps every HomeKit, Matter and Z Wave code, by home and room, on iPhone, iPad, Apple Watch and Android. Offline, no account. Free for 5 devices.