NSW residents will need to find somewhere cool to hang out today as the state faces its hottest weather for two years.

Sydney and coastal areas will be kept cooler by sea breezes but away from the beach temperatures are expected to climb past 40 degrees in some areas.

Penrith is expecting a top of 41C Liverpool and Richmond 39C and Parramatta 38C while the forecast for central Sydney is 31 degrees.

In the far west of the state Ivanhoe is tipped to reach 41C with Singleton in the Hunter Valley expecting 40 degrees.

Broken Hill and Wagga Wagga are both headed for 39C, Newcastle is expecting 38C while Grafton in northern NSW should reach 34C.

Temperatures are also expected to soar tomorrow before an expected cool change on Thursday.

AAP