Jakarta has been shrouded in hazardous smog for much of the past month. (FILE PHOTO)

Residents of Indonesia's capital on Thursday filed a lawsuit against the government over the toxic levels of air pollution that regularly blanket the city.

Jakarta has been shrouded in hazardous smog for much of the past month, with air quality readings recording high concentrations of harmful microscopic particles known as PM 2.5.

Fed up with what they say is worsening air pollution, a group of 31 concerned residents has sued President Joko Widodo, as well as the ministry of environment and forestry, ministry of health, and Jakarta's governor.

The plaintiffs -- which include activists, office workers and motorcycle taxi drivers -- want to raise awareness about the issue and force the government to act.

"(The government) has neglected people's rights to breathe healthy air," lawyer Nelson Nikodemus Simamora told reporters after filing the lawsuit.

"They have not maintained air quality at a level that is healthy enough for the 10 million people living here."

Toxic smog saw Jakarta ranked as the most polluted city in the world for several mornings running last month, forcing residents to wear pollution masks and sparking a storm of social media criticism.

Air Visual, an independent online air quality index (AQI) monitor, pegged Jakarta at the "very unhealthy" level of 231 on June 25, higher than notoriously polluted cities like India's capital New Delhi and Beijing in China.

Environment groups blame the air pollution on a cocktail of vehicle fumes, smoke and emissions from coal-fired power plants that ring greater Jakarta.

Greenpeace Indonesia last week recommended people don masks to protect themselves from respiratory illness.

"The number of unhealthy days for 2018 is twice as high as the figure for 2017," Bondan Andriyanu, climate and energy campaigner for the group, told AFP.

"The government should recognise the issue, they are still using outdated regulation from the '90s."

Public discontent has been growing, especially online where social media users have been posting pictures of the city blanketed in a grey haze.

"As a mother of two I'm worried about the air pollution issue," 35-year-old office worker Dita Nadine told AFP.

"The government should address the cause of the problem... how long will we let this problem continue?"

The environment ministry did not immediately respond to AFP's requests for comment on the lawsuit, but the head of Jakarta's environment agency, Andono Warih, played down the problem.

On Monday, he denied that Jakarta had the world's worst air pollution, the Jakarta Post reported, citing lower government figures established using a different methodology.