<P> John Quincy Adams ( / ˈkwɪnzi / ( listen ) ; July 11 , 1767 -- February 23 , 1848 ) was an American statesman who served as a diplomat , minister and ambassador to foreign nations , and treaty negotiator , United States Senator , U.S. Representative ( Congressman ) from Massachusetts , and the sixth President of the United States from 1825 to 1829 . He was a member of the Federalists like his famous influential father , but later switched to the Jeffersonian Democratic - Republican , National Republican , and later the Anti-Masonic and Whig parties when they were organized . He was the son of second President John Adams ( 1735 - 1826 , served 1797 - 1801 ) , and his wife , Abigail Adams . </P>
who is the sixth president of the united states
John Quincy Adams