Eye-tracking methodologies have revealed that eye movements and pupil dilations are influenced by our previous experiences. Dynamic fluctuations in pupil size during learning reflect in part the formation of memories for learned information, while viewing behavior during memory testing is influenced by memory retrieval and drawn to previously learned associations. However, no study to date has linked fluctuations in pupil dilation at encoding to the magnitude of viewing behavior at test. The current investigation involved monitoring eye movements both in single item recognition and relational recognition tasks. In the item task, all faces were presented with the same background scene and memory for faces was subsequently tested, whereas in the relational task each face was presented with its own unique background scene and memory for the face–scene association was subsequently tested. Pupil size changes during encoding predicted the magnitude of preferential viewing during test, as well as future recognition accuracy. These effects emerged only in the relational task, but not in the item task, and were replicated in an additional experiment in which stimulus luminance was more tightly controlled. A follow-up experiment and additional analyses ruled out differences in orienting instructions or number of fixations to the encoding display as explanations of the observed effects. The results shed light on the links between pupil dilation, memory encoding, and eye movement patterns during recognition and suggest that trial-level fluctuations in pupil dilation during encoding reflect relational binding of items to their context rather than general memory formation or strength.