Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for obtaining image data of an identification (ID) document and identifying a pattern of the ID document based on analysis of the image data against a predefined patterns for a particular type of document. An identifier engine of the system computes a frequency metric that defines how often the pattern reoccurs at the ID document and generates a unique identifier for the ID document based on the computed frequency metric. The unique identifier is stored at a digital fingerprint database of the system as a digital fingerprint for the ID document.