Unions say they are being inappropriately blocked from political campaigning in NSW.

The NSW Government has considered making it illegal for community campaigners to support specific candidates, as part of measures to reduce election-related spending by third parties like unions and churches.

The new legislation seeks to outlaw multi-million-dollar union anti-privatisation campaigns during elections.

Breaches of the cap could trigger police investigation and even prosecution.

In the High Court this week, unions will argue that a proposed $500,000 spending cap is unconstitutional.

Unions NSW leader Mark Morey says the NSW Government is trying to “silence” hundreds of thousands of union members.

“If every worker who we represent in New South Wales put in a dollar — we would be over the cap,” he said.

“Yet at a federal level, Malcolm Turnbull can put in $2 million into the Liberal Party coffers and have that spend.

“We say that's disproportionate.”

The state government has defended the legislation, which it says delivers “integrity, transparency and accountability” to elections.