Pragmatic theories assume that during communicative exchanges humans strive to be optimally informative and spontaneously adjust their communicative signals to satisfy their addressee's epistemic needs. To investigate this ability in infants, we designed a task in which 18-month-olds had to point at the target object they wanted to receive. In Experiment 1, we found that when the target was placed behind a distractor object, infants appropriately modified their pointing to avoid mistakenly indicating the distractor to their partner. When the objects were covered, and their communicative partner had no information (Experiment 2) or incorrect information (Experiment 3) about the target's location – as opposed to being knowledgeable about it – infants pointed at the target more often and employed modified pointing more frequently when it was necessary. This demonstrates that 18-month-olds can take into account their communicative partner's epistemic states and provide her with relevant information through optimally informative deictic gestures.