Techniques for generating and processing two-dimensional barcodes are described. One example method includes identifying original content to be encoded in a two-dimensional (2D) barcode structure; and generating a 2D barcode associated with the original content based on at least the 2D barcode structure and the original content, wherein the 2D barcode structure includes at least an identification field and a data field, and the identification field indicates one or more data elements in the data field.