NFC DataLink

NFC DataLink evaluates the location hash of the URL passed to it and processes the extracted data.
The clue is that the data hash in the link never leaves the web browser and is not logged on the web server.


This projects goal is to store data on NFC tags in a format which is readable on any platform supporting the standard URL scheme. In addition all data should get displayed correctly, irrespective of the operating system or device used. Currently vCards and the EU Digital COVID Certificates are supported. When a generated link is opened, the size of the link in bytes is displayed in the upper right corner. Why is this important? Because a NTAG216 NFC tag fits exactly 888 bytes, whereas a DESFire EV2 NFC tag can store a whole of 8Kb. This sounds like a lot of space, but in reality it's "only" half an A4 page of text. Last but not least there are platform dependent limitations concerning the size of the tags usable memory. On iOS for example no links larger than 5kb can be read using background scan. As of writing I couldn't find out for what reason this undocumented limitation exists.


Generate EU Digital COVID Certificate Link

To obtain the certificate, it has to be scanned by a QR code reader of your choice. The resulting string starts with HC:1 In order for the webapp to recognize the certificate data type and generate a readable QR code from it, a magic string named %%%EUDCC must be added to the end of the certificate string.

echo https://nfc.zaage.it/#$(echo -n 'HC1:COVIDCERT%%%EUDCC' | base64 -w0)
Result: https://nfc.zaage.it/#SEMxOkNPVklEQ0V...


Generate vCard Link

To create a vCard according to the current standard in a minimized way, the example below can be inserted into a text editor of your choice. Just make sure that a %%%VCARD is inserted at the end of the vCard, so that the data type can be recognized here as well. In order to include a photo it is recommended to convert a low resolution and color depth image into the WebP format. The vCard standard expects the photo to be in Base64 format. How to generate WebP Photo Base64 string? Since RFID chips only have limited storage space, the vCard may be adjusted and minifed a few times until it reaches a suitable size.

BEGIN:VCARD
VERSION:2.1
FN:Jon Doe
TEL:+123456789
EMAIL:j.doe@example.com
URL:https://example.com
BDAY:1970-01-01
PHOTO;ENCODING=BASE64;TYPE=WEBP:UklGRkAAAABXRUJQVlA4IDQAAADwAQCdASoBAAEAAQAcJaACdLoB+AAETAAA/vW4f/6aR40jxpHxcP/ugT90CfugT/3NoAAA
NOTE:https://example.com/public_key.asc
END:VCARD%%%VCARD
echo https://nfc.zaage.it/#$(echo -n "$(cat vcard)" | base64 -w0)
Result: https://nfc.zaage.it/#QkVHSU46VkNBUkt...