The Champions League winner said on its website Sunday that Navas agreed to a six-year deal and will be presented at the Santiago Bernabeu stadium on Tuesday after a medical exam.
The club did not disclose financial details.
Navas was one of Costa Rica's best players in its surprising run to the quarterfinals at the World Cup in Brazil. It beat Uruguay, Italy and Greece before losing a penalty-kick shootout to the Netherlands. Navas made a string of saves in that quarterfinal in which Costa Rica held the Dutch to a 0-0 tie through 120 minutes.