Florence Sihombing vented her anger on the social media platform Path last week, after she failed to get her motorcycle filled up at a petrol station in the central Javan city because of a long queue.
Her message, in which she called Yogyakarta "poor, stupid and uncultured," sparked anger after it made its way to the more popular social networks Twitter and Facebook.
Ms Sihombing, a graduate law student at Yogyakarta's Gadjah Mada University, was arrested on Sunday after several groups in the city filed complaints against her to the police.
She apologized for the insult and was released on bail the following day.
"The investigation is continuing and once completed we will hand over the case to prosecutors," said Yogyakarta police spokeswoman Anny Pudjiastuti.
Ms Sihombing will likely be charged under the information and electronic transactions law, and could face up to six years in prison if found guilty of online defamation, she said.
Rights activists have criticized the police stance as excessive, and urged them to drop the case.
Civil-society groups have criticised the law ever since it was passed in 2008, saying it could be misused to muzzle freedom of expression.