The former civil servant, known only as Anchan, posted audio clips from a podcast on social media.
The 63-year-old said she had simply shared the audio files and had not commented on the content.
Thailand's lèse-majesté law, which forbids any insult to the monarchy, is among the strictest in the world.
After a three-year break, Thailand revived the controversial law late last year in an attempt to curb months of anti-government protests, with demonstrators demanding changes to the monarchy.
Anchan pleaded guilty to 29 separate violations of sharing and posting clips on YouTube and Facebook between 2014 and 2015, her lawyer told the Reuters news agency.
She was initially sentenced to 87 years, but this was cut in half because of her guilty plea.
Anchan is among a group of 14 people charged with lèse-majesté shortly after a military junta seized power in 2014, vowing to stamp out criticism of the monarchy.
The group is accused of uploading podcasts, popular in dissident circles, which questioned official accounts of the monarchy. The author of the podcasts served only two years in jail, and has already been released.
The trial was held behind closed doors and the evidence against the defendant kept secret for reasons of national security.
Thailand has a long history of political unrest and protest, but a new wave began in February after a court ordered a fledgling pro-democracy opposition party to dissolve.
While protesters had a range of demands relating to the government, things really kicked off when protesters began questioning the powers of the monarchy.
Protests included demands to curb recently expanded powers to the monarchy and challenged the king's decision to declare Crown wealth as his personal property, making him by far the wealthiest person in Thailand. It had until now been notionally held in trust for the benefit of the people.
There have also been questions over King Vajiralongkorn's decision to take personal command of all military units based in Bangkok - a concentration of military power in royal hands unprecedented in modern Thailand.
The move sent shockwaves through a country where people are taught from birth to revere and love the monarchy and fear the consequences of talking about it.
The definition of what constitutes an insult to the monarchy in Thailand is unclear and human rights groups say the lèse-majesté law has often been used as a political tool to curb free speech and resist opposition calls for reform and change.
Royalists have come out to oppose the student-led demonstrations - and say the protesters want the abolition of the monarchy, something they deny.