Charlemagne’s military campaign against the Saxons lasted approximately 30 years. The Saxon Wars are conventionally dated from 772 to 804, a span of about 32 years.
This was not one continuous war but a series of invasions, campaigns, revolts, negotiations, and forced settlements. The Saxons lived mainly in what is now northern Germany and resisted Frankish expansion as well as Charlemagne’s attempts to impose Christianity.
Their most prominent leader was Widukind, who resisted Charlemagne for years before accepting baptism and submitting in 785. Rebellions continued afterward, however, and the final major resistance was suppressed in 804. Charlemagne deported many Saxons and transferred some territory to his Slavic allies, the Obotrites.
The conflict had lasting consequences: Saxony was incorporated into the Frankish realm, and its religious and political institutions were reshaped. The date range is sometimes described as 32 years, but “30 years” is the expected approximate answer.