Pet identification seems to predominantly take on one of two forms. Either traditional tags attached to the pet's collar, or microchips inserted under the pet's skin.
The physical tags can easily be removed or might even break off if a pet was playing or involved in a fight or sometimes even gets left behind if an animal squeezes through a tight space, so it's not a complete solution. It does hold some benefits over microchipping though, as the information is clearly visible and accessible to anyone, whereas microchips have to be scanned by a vet.
This idea combines the two existing practices. I'm proposing giving pets a permanent or semi-permanent marking (like a QR code) that can be scanned using any smartphone. This could be done using a non-toxic ink on the fur or skin under the leg or on the belly.
Pet owners could purchase a unique stencil along with the ink/paint which would then be linked to a page with their details, allowing them to reapply on their pets as needed (I could even imagine using the same stencil on children's schoolbags or jackets or any item that might regularly get left behind)
The main benefits of this would be that it is visible and most people would recognise what to do when faced with a QR code, whereas people who don't live near vets might not appreciate having to take a stray pet in on the chance that it might be microchipped, and it can't fall off or be easily removed, unlike a physical tag.