A codec is a device or computer program capable of encoding and/or decoding a digital data stream or signal. The word codec is a portmanteau of 'compressor-decompressor' or, more commonly, 'coder-decoder'. A codec (the program) should not be confused with a coding or compression format or standard – a format is a document (the standard), a way of storing data, while a codec is a program (an implementation) which can read or write such files. In practice "codec" is sometimes used loosely to refer to formats, however.

A codec encodes a data stream or signal for transmission, storage or encryption, or decodes it for playback or editing. Codecs are used in videoconferencing, streaming media and video editing applications. A video camera's analog-to-digital converter (ADC) converts its analog signals into digital signals, which are then passed through a video compressor for digital transmission or storage. A receiving device then runs the signal through a video decompressor, then a digital-to-analog converter (DAC) for analog display. The term codec is also used as a generic name for a video conferencing unit.