A barcode is a one-dimensional code that can only store a limited amount of data, typically a product number or code. A QR code, on the other hand, is a two-dimensional code that can store much more data, such as a URL or contact information. QR codes can also be scanned from any direction, while barcodes must be scanned from a specific direction.