The two main types of barcodes include linear (1D) and 2D barcodes. Linear barcodes are the most common type of barcode. 2D barcodes can store more information than linear barcodes and are often used for tracking inventory.