What Is a Key-Value Pair?

A key-value pair is a computer science and data structure concept. A key is a unique identifier that links to an associated value. The pair represents two connected pieces of information that enable fast data retrieval. Data structures such as dictionaries or hash tables utilize key-value pairs.