An identity document can be authenticated using format data of a barcode on the document, such as a barcode on a driver's license. Scan data is obtained by decoding a plurality of barcodes. Format features of the plurality of barcodes are extracted. Scan data is classified into two or more clusters. Each cluster is characterized by a set of format features extracted from the scan data. A barcode on an ID to be verified is scanned. Format features from the barcode of the ID to be verified is compared to at least one of the two or more clusters to authenticate the ID.