Helen Stephenson, chief executive of the Charity Commission, has warned charities to avoid promoting their leaders’ views rather than representing their beneficiaries before any general election.
In a blog on the commission’s website, Stephenson said the commission had "no wish to narrow the space in which charities can engage".
She said: "I know that many charity leaders will see this as a critical moment to speak up for the cause they serve, and that is legitimate and healthy for our country."
She warned charities to avoid unnecessarily straying into what was a very tense political debate, and warned that the consequences of doing so could damage the standing of charities in society.
"If charities appear to the public to be engaged in political debate not because they are representing their beneficiaries or bringing expertise, but because they are taking a position on one side of a political divide, this undermines public confidence in charity as something special, which can inspire trust where other institutions do not," she said.
"The deeper the divisions in the country, the more important it is that charities are demonstrably driven not by their leaders’ own world views, but by the needs of the beneficiaries they serve.
"Charities have the potential to build bridges and heal social divides; if that is damaged then everyone will lose out."
The blog also comes at a time of considerable uncertainty in the country, with the possibility remaining of a no-deal Brexit at the end of October.
Boris Johnson has twice had votes to prompt a general election rebuffed in the House of Commons, but most reports suggest an election before the end of the year is all but certain.
Stephenson promised the regulator would be be as impartial as possible if any vexatious complaints about a charity emerged during the election.
Restrictions on charity campaigning such as the lobbying act and so-called "gagging clauses" in government contracts have proved controversial among voluntary sector organisations in recent years.
The regulator reissued guidance on charities’ campaigning activities in the run-up to the 2016 EU referendum, which had been criticised by lawyers for "misrepresenting the law".