Google has teamed up with the Indian government to develop a toilet locator app that enables users to find public washrooms in order to combat the nationwide problem of open defecation and urination.

The Google toilet locator app, launched in the states of Delhi and Madhya Pradesh, at the moment helps people find access to clean public restrooms. The app, launched on Thursday, will also have a wide range of features such as cleanliness ratings, the style of toilet and if it requires a fee to use.

The app enables users to type words such as "toilet" or "lavatory" or Hindi words like "swachh" and "shulabh" meaning clean to access the closest restrooms in the area, media reports say.

"When you search for 'public toilet' on Google Maps in an area where the service is available, you'll see a list of restrooms near you, including the respective address and opening hours," Sanket Gupta, product manager Google Maps India, said at a launch event in Delhi.

"For instance, if you're travelling on the national highway 8 in Gurugram, locating a public toilet can be challenging and most often the only option is going to nearby restaurants and cafes. Having this information handy can make things much easier."