The government is promising voters "the same transparency" in online election and referendum campaigns as they get in leaflets and on posters.
Social media ads and videos will have to carry a "digital imprint" showing who has created them so voters can judge their credibility.
Electoral reform campaigners said the plan "must be just the start" of "cleaning up" UK democracy.
The government's proposals will now go out to public consultation.
Election leaflets and newspapers have to include who made and paid for the material, although there is no rule on how prominent this branding should be - and all three major UK-wide parties were criticised at last year's general election for mimicking local newspapers or official letters.
But there has been a huge shift away from leaflets and newspapers towards online advertising, going up from 3% of total spend in 2011 to 42.8% in 2017, according the most recent Electoral Commission figures.
'Wild West'
Online political advertising is largely unregulated in the UK and campaign material is not required by law to be truthful or factually accurate, or to say who is paying for it.
Last year the Electoral Reform Society, which campaigns for changes to the voting system, described it as being like the "Wild West" and subject to rules stuck in the "analogue age".
The Conservative Party has itself been accused of misleading voters when it rebranded its press office Twitter account as Fact Check UK during a TV debate at the 2019 general election.
The then party chairman James Cleverly said the Twitter feed had been clearly labelled "CCHQ press".
Image copyright Other Image caption Chloe Smith said clear rules were needed to improve transparencyUnveiling the government proposals, promised in last year's Queen's Speech, Constitutional Affairs Minister Chloe Smith said: "Voters value transparency.
"So we must ensure that there are clear rules to help them see who is behind campaign content online."
She claimed these would help create "one of the most comprehensive sets of regulations operating in the world today".
'Organic content'
Under the government's plans, a "digital imprint" would have to be displayed as part of online content - such as a video or a graphic.
But the government says that "where this is not possible" it should be located in an "accessible alternative location linked to the material".
Ministers want registered political parties, registered third parties, political candidates, elected office holders and registered referendum campaigners to put an imprint on their digital campaign material whether it is paid-for advertising or "organic" content - where no professional advertiser is paid to promote and distribute it.
For unregistered campaigners, this would apply only to paid-for content.
But the rules will cover all campaign-related content, whichever country it was produced in - and would apply all the time, not just during elections and referendums.
The government argues this would allow the Electoral Commission to "better monitor who is promoting election material and enforce the spending rules," which prevent foreign donations.
'Bare minimum'
The Electoral Commission says it does not have the power or resources to monitor the truthfulness of political advertising but changing the law to add imprints will help voters assess the credibility of online campaign messages.
A spokesman said: "This is a welcome opportunity to deliver real change for voters and provide them with a better understanding of who is trying to reach them online."
Darren Hughes, chief executive of the Electoral Reform Society, said: "For too long, our democracy has been wide open to anonymous 'dark ads', dodgy donors, and foreign interference online.
"This won't solve all that, but it will help to plug one of the many leaks in HMS Democracy."
He added that "strong sanctions" were needed for those who broke the rules and that ministers "must not be able to pass the buck to Silicon Valley giants".
Alex Tait, co-founder of the Coalition for Reform in Political Advertising, said: "The consultation on imprints is certainly welcome but this is the bare minimum that the government could be doing to modernise electoral regulation."
Foreign interference
The government said the digital imprint plan would "sit alongside" its efforts to crack down on foreign interference in UK elections and referendums through a newly-established Counter Disinformation Unit.
Last month Foreign Secretary Dominic Raab said it was "almost certain" that Russians had sought to influence the 2019 general election.
And a report by the Intelligence and Security Committee said the government had made no effort to investigate Russian interference in the 2016 Brexit referendum.