A bar code is an optical machine-readable representation of data relating to the object to which it is attached.It serves as the Universal Product Code. Bar codes originally were scanned by special optical scanners called bar code readers. Later, scanners and interpretive software became available on devices including desktop printers and smartphones.