GlaxoSmithKline plans to split into two businesses — one for prescription drugs and vaccines, the other for over-the-counter products — after forming a new joint venture with Pfizer's consumer health division.

The revamp is the boldest move yet by GSK Chief Executive Emma Walmsley, who took over last year.

It will lead to the creation of a consumer health giant with a market share of 7.3 percent, well ahead of its nearest rivals Johnson & Johnson, Bayer, and Sanofi, all on around 4 percent. Walmsley has previously played down the idea of breaking up the group, something that a number of investors have called for over the years.

On Wednesday, however, she announced that GSK and Pfizer would combine their consumer health businesses in a joint venture with sales of 9.8 billion pounds ($12.7 billion), 68 percent-owned by the British company, in an all-equity transaction.

In an interview with CNBC's "Squawk Box" on Wednesday, Walsmley said the consumer business will still help GSK with cash flow but merging it with Pfizer's consumer unit will create a company with "significant" scale that can focus on only consumer. Meantime, GSK can keep investing in pharmaceuticals and vaccines.

"This opportunity is truly a unique one in an all-equity deal to create the world's leading over-the-counter drugs company, a leading consumer health-care company with significant value creation for shareholders," Walmsley said on CNBC's " ." "But it also allows us to strengthen our number one priority, our pharma pipeline."