A woman walking through a central Queensland town was sexually assaulted before her screams attracted help and her attacker ran off.

A man has been charged with sexually assaulting a woman in a central Queensland town.

The woman was attacked while walking through Biloela about 2.20am (AEST) on Saturday.

She screamed and someone came to help.

After a struggle, her attacker ran away.

A Biloela man, 32, has been charged with assault with intent to rape and will face the Gladstone Magistrates Court on Monday.