Sophia of Masovia (1497/1498 - before 11 March 1543 ) was a Princess of Masovia, daughter of Konrad III Rudy, Duke of Masovia and his wife Anna Radziwiłł. She was a member of the House of Piast.
On 17 September 1520 in Warsaw, Sophia was married by proxy to Stephen VII Báthory. On 17 January 1521, Sophia and her entourage went to Hungary, where in February there was a formal marriage. The couple had three children: Anna, Stephen and Klara; however, other sources claim that Klara was the couple's only child. Klara was engaged to Carl, Duke of Münsterberg, but died in 1535, before the marriage took place.
After the death of Stephen in 1530, Sophia was married to Croatian magnate Louis Pekry. Sophia's second marriage was childless; she died sometime before 11 March 1543.
Sophia had three siblings: Stanislaus I of Masovia, Janusz III of Masovia and Anna of Masovia, both her brothers died childless and so Anna and Sophia were the last Masovian Piasts. Soon after Janusz's death, the Duchy of Masovia was annexed into the kingdom of Poland, despite resistance from some of the Masovian nobility. They tried to retain their independence and argued that the Duchy should be inherited by the female relatives (such as Anna or Sophia). The Polish king refused to recognize their demands. Anna was made titular Duchess of Masovia.