New laws targeting the illegal gun trade have passed through the New South Wales Parliament.

The laws create a new offence for possessing a stolen gun, which carries a maximum penalty of 14 years in jail.

Deputy Premier and Police and Justice Minister Troy Grant said the act would deliver on a commitment by the NSW Government to crack down on those who endangered the community.

"These laws have a clear focus of hitting the illegal firearms trade because it's clear the illegal gun market presents the threat to the community," Mr Grant said.

Parliament has also put in place 14-year jail sentences for range of other offences, including use, supply, or acquisition of prohibited firearms.

The laws also ban the possession of digital blueprints that could help someone make a firearm with a 3D printer.