Two NSW inmates have been busted attempting to tunnel out of their prison cell, using toothpaste and toilet paper to mask their escape route.

A prison officer noticed the paste and paper jammed into the edges of a sandstone block at Bathurst Correctional Facility yesterday.

"I noticed near the cell bars at the back of the cell what appeared to be diggings into the concrete, and the mortar had been removed from around the large sandstone block," the officer said in a statement.

Two NSW inmates have been busted attempting to tunnel out of their prison cell, using toothpaste and toilet paper to mask their escape route. Picture: Google Maps (Google Maps)

The holes had been concealed with toilet paper and secured in place with toothpaste, she said.

Corrective Services NSW Commissioner Peter Severin praised the work of the prison guard.

"We are all very proud of this officer, whose curiosity and methodical cell search uncovered this brazen escape attempt," Mr Severin said in a statement.

The two inmates, aged 37 and 39, deny all knowledge of the tunnelling, and have been placed in segregation as investigations continue.

In 2017 there were 10 prison escapes in NSW, which were mostly from minimum-security prisons, according to Corrective Services NSW.