Sadiq Khan said he was not prepared to put Tube, bus and other transport users at risk by relaxing the rules on face coverings.
Face masks have been mandatory on public transport for the past year to reduce the spread of the virus.
But those rules will be replaced with government guidance advising passengers to wear masks only on busy services.
England is removing most of its Covid restrictions next Monday, and while Prime Minister Boris Johnson has said he expects masks to be worn in crowded places, such as on a busy Tube train, their use will no longer be compulsory.
London was the first English city to insist on face coverings after Covid restrictions ease.
In Scotland, the mandatory use of face coverings will remain in place for “some time”, First Minister Nicola Sturgeon has said, even after the country eases most of its other restrictions on 19 July.
The rules for masks apply in shops and public transport – as well as pubs and restaurants when not seated.
In Wales, masks will continue to be required by law in some settings. The Welsh government has said face coverings would still be mandatory on public transport and in health and social care settings.
Mr Khan has made face masks a condition of carriage for the Tube, bus, tram, DLR, Overground and TfL Rail.
This means that, despite the easing of restrictions on 19 July, it will be listed as a condition in a legal agreement between Transport for London (TfL) and its customers.
Face coverings will also be required in taxis and private hire vehicles by both drivers and passengers unless they are exempt.
Mr Khan said: “We know from the government’s own advisors and from the World Health Organisation, that wearing a face covering indoors does reduce transmissions.
“It leads to greater public safety and greater public confidence as well.
“As long as the virus is still with us, and as long as we’re still concerned about the virus being transmitted, we will make it compulsory.”
He said he was “confident you will see from Monday high levels of the rules being followed just like there have been since last June”.
TfL’s 400 enforcement officers will deny those without a face covering from using London transport, under the plan.
TfL staff and bus drivers will continue to remind passengers that masks are a requirement, Mr Khan said.
Greater Manchester Mayor Andy Burnham has said he will not ‘”rule out” mandating face masks on public transport.
Mr Burnham told the BBC he had not yet taken the decision to mandate masks on trams in Manchester and wanted to avoid adding to people’s confusion.
The reaction from commuters has been pretty unanimous – the message over masks is mixed and confusing.
Now, for example, at many merged stations in London – like Barking, Richmond, Wimbledon & Shepherd’s Bush – you could go from a rail service where masks are personal choice, to a TfL service where they are a condition of carriage.
Sometimes different services even use the same the platform.
So you’ll have to become very adept at differentiating a TfL rail service from a national rail one.
For an industry that is trying to become more uniform, standardised and is meant to be about making fares and interchanges easier, it’s a complete mess.
The rail industry says masks will put people off using public transport – polling in London says the opposite.
The question now is, will other mayors and train operators follow London’s example?
Or could a simple single rule for all public transport emerge, even at this late stage?
A poll from the travel watchdog TransportFocus found 56% of Londoners said say they will not use public transport “unless passengers are required to wear a face covering”.
The legal requirement to wear a face covering in shops, public transport and other enclosed public spaces will end on 19 July. It will be replaced with government guidance.
A government spokeswoman stressed there would be a shift from “universal government diktat to relying on people’s personal responsibility”.
“The guidance is clear that people are expected and recommended to wear a mask when they come into contact with people they don’t normally meet in enclosed and crowded spaces,” she said.
Transport Secretary Grant Shapps said the rules were “just common sense when you think about it” as “you would be in a crowded area” on London transport.
Labour has said it is “irresponsible” to drop the legal requirement to wear masks.
The move has been welcomed by the RMT union, which represents rail workers. It said the approach was consistent with the rules that are currently in place in Scotland, Wales and on Eurostar services to the continent.
However, it said: “We now have the ludicrous position where a passenger travelling through London will have different rules on the Tube and the mainline services.”
Mr Shapps said: “We’ve seen lots of these rules being different in different parts of the UK.
“The same way you can’t drink alcohol on London transport systems, but you can on some long distance journeys.”
From 2 May to 29 May 2021, 86% of TfL customers said they were wearing face coverings at all times on public transport.
Of the 14% not wearing a face covering at all times or not at all, almost three-quarters (74%) claim to have an exemption or good reason under the current regulations for not doing so, TfL research shows.
Andy Byford, London’s Transport Commissioner, said: “The transport network is cleaner than ever, with an enhanced cleaning regime, hospital grade cleaning products, widely-available hand sanitizer and UV light fittings on escalator handrails to kill viruses.
“It is great news that regular independent testing for the virus by Imperial College has found no trace on our services, and we are now ready to safely welcome back more and more customers from 19 July as people head out to enjoy all that the capital has to offer.”