Fifa president Gianni Infantino had threatened a European TV blackout if rights offers were not improved.
But the deal with football’s governing body will allow domestic viewers to watch matches when the tournament begins in Australia and New Zealand.
European champions England first play in Brisbane on 22 July against Haiti.
All 64 matches from the tournament will be broadcast in the UK on either the BBC or ITV, except for the final on 20 August, which will be shown across both BBC One and ITV1.
The BBC will also broadcast live audio commentary on BBC Radio 5 Live and 5 Sports Extra, with fans able to listen to 5 Live coverage on BBC Sounds, DAB radio and the BBC Sport website and app.
Barbara Slater, director of BBC Sport, said: “We have shown every Women’s World Cup on the BBC since 1999 and we are happy to extend our partnership with Fifa for the upcoming tournament.
“The growth of the women’s game is extraordinary, demonstrated by the 28 million who watched BBC coverage of the 2019 Women’s World Cup and the huge audience of 17.4 million who watched our coverage of the Euro 2022 final last summer on TV.
“In partnership with ITV, we are delighted to make this World Cup available to the widest possible audience and free to air.”
ITV will show coverage of half of the tournament’s matches across ITV1 and ITV4 with simulcast and catch-up on ITVX.
Niall Sloane, ITV director of sport, said: “We’re delighted to be able to bring comprehensive coverage of the Women’s World Cup, free to air to our audiences with both live and highlights broadcasts across ITV and ITVX.
“This tournament promises to provide memorable moments with the popularity of women’s football continuing to grow.”
The BBC and ITV have partnered with the European Broadcasting Union (EBU), an alliance of public service media organisations, for the deal.
Fifa said it had agreed with the EBU to “extend their existing media right partnership”, which ensures the Women’s World Cup will be shown on free-to-air linear TV across 34 European territories.
World football’s governing body added the deal includes “a substantial additional commitment to the regular transmission of women’s football content beyond the tournament”.
“Fifa is delighted to widen the deal with the European Broadcasting Union for the transmission of the upcoming Women’s World Cup to include the five major markets within their existing networks, namely France, Germany, Italy, Spain and the United Kingdom, as well as Ukraine, thus ensuring maximum exposure for the tournament,” Infantino said.
“As part of this agreement, the EBU has committed to working towards broadcasting at least one hour of weekly content dedicated to women’s football on its own digital platform and broadcaster network.”
How did we get here?
Infantino said last month that offers from the UK, Spain, Italy, Germany and France were a “slap in the face” of the players and “all women worldwide”.
He added it was Fifa’s “moral and legal obligation not to undersell” the event after European broadcasters offered significantly less compared with their bids for the men’s World Cup.
According to Infantino, they had offered $1m-$10m (£800,000-£8m) for the rights, compared with $100m-$200m for the men’s tournament.
Politicians from those five countries, including UK Culture Secretary Lucy Frazer, wrote to acknowledge “with concern” that an agreement was not in place – although they were confident “a common path” would be found.
Speaking to the Culture, Media and Sport Committee on Tuesday, the BBC’s Charlotte Moore said the corporation would not be pressured by Fifa into overpaying but remained “absolutely committed” to striking a deal.
Prize money trebled after more than one billion watch in 2019
In the UK, the Women’s World Cup and European Championship were last year added to the ‘crown jewels’ of sporting events, which means they require free-to-air coverage.
The BBC held the sole broadcast rights in the UK for the 2019 Women’s World Cup but shared the rights for the recent men’s World Cup in Qatar with ITV.
A record 28.1m people across the UK tuned in to the BBC’s 2019 Women’s World Cup coverage from France, with 11m people watching England’s semi-final loss to the United States.
According to Fifa’s data, a total of 1.12 billion people watched in 2019 – a record for a women’s tournament – and almost half the total viewing hours were from Europe.
Fifa have trebled the total prize money for the 2023 Women’s World Cup, to $152m (£120m).
The governing body has also reiterated its aim to have equal pay for the men’s and women’s World Cups in 2026 and 2027. BBC