The Canadian airline also said it would resume four flights a week on its Glasgow-Halifax route from May, which was launched in 2015 but grounded since March last year by the coronavirus crisis.
Four flights a week to Toronto will start from Glasgow in May and three a week from Edinburgh in June, using single-aisle Boeing 737 Max aircraft.
It is understood Air Canada also intends to resume its Edinburgh to Toronto flights next year, after being suspended because of the pandemic, but the future of its Glasgow-Toronto route is uncertain.
Virgin Atlantic announced a new Barbados route from Edinburgh three weeks ago.
WestJet chief commercial officer John Weatherill said: “We’re committed to continuing to introduce new destinations and routes to our network.”
Transport minister Graeme Dey said: “It is encouraging to see airlines develop their connectivity with Scotland.
“Canada is an important market for Scotland and I am sure these routes will be welcomed by both business travellers and tourists in both our countries.
"I also welcome the use of WestJet’s latest generation aircraft that will help minimise carbon emissions.”
Edinburgh Airport said it expected more transatlantic flights to resume services next year.
Chief executive Gordon Dewar said: “We know there is huge interest in North America and Canada in particular, so welcoming a fantastic airline like WestJet to Edinburgh Airport is hugely exciting.
“People are beginning to plan those family reunions and longed-for holidays, so we hope new additions where possible will satisfy that demand.
"The route will also present a great opportunity to strengthen business links.”
Derek Provan, chief executive of AGS Airports, which owns Glasgow Airport, said: “As well as being the first North American carrier to confirm a return to Glasgow with the resumption of the Halifax route, our long-time airline partner WestJet has also chosen to strengthen its partnership with us further by expanding operations in Scotland to now include Toronto.
“Both the Halifax and Toronto routes are crucial steps towards the rebuilding of Glasgow’s long-haul network and re-establishing the airport’s dominant position in the Scotland-Canada market.”
Glasgow City Council depute leader David McDonald said some 38,000 Canadians visited the city in 2019, spending £12 million.