The provisional death toll given by the government made it the country's deadliest attack in recent years.
The attackers struck during the night on Friday, killing residents of the village of Solhan in Yagha province bordering Niger. They also burned homes and the market, the government said in a statement.
The government, declaring a 72-hour period of national mourning, described the attackers as terrorists but no group claimed responsibility.
Hallmarks of al Qaeda and the Islamic State in West Africa
Attacks by jihadists linked to al Qaeda and the Islamic State in West Africa's Sahel region have risen sharply since the start of the year, particularly in Burkina Faso, Mali and Niger, with civilians bearing the brunt.
The violence in Burkina Faso has displaced more than 1.14 million people in just over two years, while the poor arid country is also hosting some 20,000 refugees from neighbouring Mali who are seeking safety from jihadists.
Faced with the resurgence of jihadist attacks, the armed forces have launched a large-scale operation in the northern and Sahel regions.