Huynh Thuc Vy, 33, was convicted of "desecration of the national flag", at a one-day trial at the People's Court of Buon Ho town in Vietnam's Central Highlands province of Dak Lak, the official Vietnam News Agency reported.
Despite sweeping economic reform and increasing openness to social change, Vietnam's ruling Communist Party retains tight media censorship and does not tolerate criticism.
Vy's lawyer could not be reached for comment. A court official declined to comment about the case, which was condemned by international rights groups.
She was found spraying white paint on two flags and erecting them on a street in the town during the National Day holiday last year, the report cited the indictment as saying.
The report said Vy posted a photo of the flags on Facebook with a comment saying "protesting the ceremony with red flags painted white".
Vy, the founder of the organization Vietnamese Women for Human Rights, regularly writes posts about human rights violations, including the persecution of ethnic minorities in the country, Amnesty International said.
"This ludicrous charge must be dropped as it is aimed solely at silencing a dedicated, peaceful human rights activist," the London-based rights group said ahead of the trial.
Phil Robertson, deputy Asia director of Human Rights Watch, said by email: "What this sentence means is a young mother will be separated for years from her child simply for expressing views the government doesn't like."
Friday's trial is the latest in the Southeast Asian country's crackdown on dissent, in which several Facebook users have been jailed over anti-government comments.
Facebook, which is widely used in Vietnam and serves as the main platform for dissidents, did not immediately comment on the case. There was no immediate government comment on the case.
Vietnam said this month it wants 50 percent of its social media customers to use domestic social networks by 2020 and plans to prevent "toxic information" on Facebook and Google.
Earlier this month, the government released a long-awaited draft decree on guidelines to implement a cybersecurity law that global technology companies, including Facebook, and rights groups have said could undermine development and stifle innovation.
(With inputs from agencies.)