The draft Investigatory Powers bill is due to be published.
Internet firms will have to store details of every website visited by UK citizens in the past 12 months, under planned new surveillance laws.
The police and security services will have to get permission to access the content and councils will be banned from trawling the records.
Home Secretary Theresa May insists the powers are needed to fight terrorism and promises tough safeguards.
The draft Investigatory Powers bill is due to be published later.
The government has dropped plans to give the authorities full access to everyone’s internet browsing history, amid fears it would not get through Parliament. Instead it wants the ability to access basic data on domain addresses visited.
And it is set to give judges the power to block spying operations authorised by the home secretary, according to The Times.
At the moment the home secretary and other senior ministers sign warrants allowing the security services to look at the content of communications by suspected terrorists and criminals – more than 2,700 were signed last year.
Under the new system, reportedly to be included in the draft bill, a panel of 10 or more judges will review the warrants and have the power to overrule ministers.
The proposed new laws will also cover when and how the state can mount its own hacking operations – and also how GCHQ, the secret communications agency, can launch operations to collect vast quantities of internet data as it flows through the UK.
The draft bill, which David Cameron says is one of the most important pieces of legislation of this parliament, will be unveiled in a Commons statement by Mrs May and will then be examined in detail by both Houses of Parliament before a final bill is produced and debated and voted on.
London Mayor Boris Johnson warned that the new powers must not be used as an “instrument of oppression,” saying the proposed law was “defensible if and only if it’s supervised by a judge”.
Analysis by Dominic Casciani, BBC home affairs correspondent
The language in the draft bill will be dry – but quite simply it creates new powers to allow arms of the state to access your online life – if they have cause and legal justification to do so.
How will the powers be used? Most certainly against terrorism suspects, organised criminals and people involved in abuse, exploitation and kidnappings.
Will they be used against the innocent? Ministers will promise world-leading levels of restrictions, scrutiny and oversight which they say will be designed to prevent abuse from ever taking place.
Critics will call this a snooper’s charter – but security chiefs and police say they’re not interested in your online shopping habits – only the habits of serious threats to society.
And they say this legislation is long overdue – and has the backing of three major reports in the last year that broadly agreed that there should be no safe space online for criminals.
Mrs May has long called for new laws to give police and security services the power to access online communications data, saying some sites had become “safe havens” for serious criminals and terrorists.
She has argued for similar rules to those governing phone records – which can be accessed without a ministerial warrant – for online communications.
The bill is expected to propose compelling companies to hold “internet connection records” for 12 months so they can be requested by authorities.
Such data would consist of a basic domain address, and not a full browsing history of pages within that site or search terms entered.
For example, police could see that someone visited www.bbc.co.uk – but not the individual pages they viewed.
Police and intelligence officers would have to get permission from their superiors to access this basic data. If they want to get more details about browsing history, or to hack into the content of emails, they will have to get permission from the home secretary, as they do now.
Mrs May has said the government “will not be giving powers to go through people’s browsing history”.
Councils will not be able to obtain these records, Home Office sources said.
For more intrusive surveillance – involving the detailed content of the communications – security services need to obtain a warrant.
In June, the government’s independent reviewer of terrorism, David Anderson, said the current law was “fragmented” and “obscure” and called for comprehensive new legislation to be drafted from scratch.
Opposition parties, civil liberties campaigners and some Conservative MPs have raised concerns about the government’s plans, which were briefed to cabinet ministers on Tuesday and first announced in May’s Queen’s Speech.
Among the safeguards emphasised by Home Office sources would be a new criminal offence of “knowingly or recklessly obtaining communications data from a telecommunications operator without lawful authority”, carrying a prison sentence of up to two years.
Mrs May has said the bill does not include some “contentious” parts of the 2012 plan, dubbed a “snooper’s charter” by critics.