This R package provides the Cantor and Hopcroft-Ullman pairing functions, which are functions that uniquely encode pairs of non-negative or positive integers to a single integer. The package also provides functions to reverse this encoding, i.e. the inverse pairing functions.