Sonata da chiesa (Italian: "church sonata") is a 17th-century genre of musical composition for one or more melody instruments and is regarded an antecedent of later forms of 18th century instrumental music. It generally comprises four movements, typically a largo prelude followed by a fugal allegro, an expressive slow movement, and an allegro finale, although there are also many variations of this pattern.
During the 17th century, church services were increasingly accompanied by music for ensembles rather than solo organ, with canzonas and sonatas regularly substituted for the Proper during Mass and Vespers. Many of these works, however, were not written explicitly as liturgical music and were often performed as concert pieces for entertainment. The term sonata da chiesa was originally used in its literal meaning of "church music", but later came to be used figuratively to contrast this genre of composition with the sonata da camera, which literally meant "chamber music", but generally comprised a suite of dances.