The trio sonata is a musical form which was particularly popular around the end of the 17th century and the beginning of the 18th century.

A trio sonata is written for two solo melodic instruments and basso continuo, making three parts in all, hence the name trio sonata. However, because the basso continuo is usually made up of at least two instruments (typically a cello or bass viol and a keyboard instrument such as the harpsichord), trio sonatas are typically performed by at least four instruments.

The melody instruments used are usually both violins. A well known exception is the trio sonata in Johann Sebastian Bach's The Musical Offering, which is for violin and flute.