The key difference between a code and a cipher (also spelled cypher)is that a code has no physical relationship to the message. A code can be a word, a symbol, a sequence of events, or an arrangement of objects.

For example, Paul Revere used a lantern code to know what his observer saw of British troop movements. "One if by land, and two if by sea, and I on the opposite shore shall be." Other examples include color codes, codewords, and international traffic symbols.

A cipher is a straight one-for-one letter substitution using letters, numbers, or symbols that replace each letter in the encoded message.