The amount to be charged for the use of public facilities will be 60 euro cents (80 cents US).
"Adif has contracted out the management of the toilets at Madrid Puerta Atocha with the objective of improving the quality of service for users," said the company in a statement.
Those improvements will include the introduction of water saving technologies and toilet redesigns.
The contract has been awarded to 2theloo.
That company is also now "negotiating with other businesses at the station so that toilet users" can get "discounts" on goods and services in those shops, said Adif in its statement.
Madrid Puerta Atocha sees 17 million passengers a year and is one of Spain's most important stations.
Adif is using the Madrid project as a test case. If it works, the company will look at introducing paid toilets in other large, busy stations, Adif told Spanish daily El País.
Toilets in the departure areas at Atocha — accessible only with a ticket to travel — will remain free, Adif said.