Castanheira de Pera (), often erroneously written Castanheira de Pêra, is a Portuguese municipality in the historical Beira Litoral province, in Central Region and district of Leiria. The population in 2011 was 3,191, in an area of 66.77 kmò.
The present Mayor is Fernando José Pires Lopes, elected by the Socialist Party. The municipal holiday is on July 4.
Administratively, the municipality consists of 1 civil parish (freguesia):