The Independent National Electoral Commission (Inec) had previously only allowed six formations to contest the elections, due between 29 March and 29 April.
But five groups protested at their exclusions and filed a court case against Inec. Last month, the Supreme Court found in their favour and ordered Inec to relax its regulations for registering.
Few of these extra parties are likely to gain much support, say correspondents.
President Olusegun Obasanjo is standing for re-election but correspondents say that he is expected to face a strong challenge.
In 1999, he won with the help of northern power brokers but he has lost some support in the Muslim north over his opposition to the reintroduction of Sharia law.
Logistical nightmare
"The commission wishes to congratulate the new political parties for their success, and further wishes them good fortune and a productive outing into the democratic setting," said Inec chairman Abel Guobadia.
The BBC's Bilkisu Labaran Ohyoma in Abuja says the registration of 22 extra parties will present a logistical nightmare for Inec.
In a country with such a high rate of illiteracy, party symbols have to appear alongside party names to facilitate recognition.
Some people are now wondering what a ballot paper featuring the names of 28 candidates for each post, with 28 party names and symbols will look like.
Just three parties were registered in the previous elections, which marked the end of 16 years of military rule.
In order to avoid regionally-based parties, they had to show that they support from areas across Nigeria.
Since the return of civilian rule, several thousand people have been killed in ethnic and religious disputes.
Most recently, more than 220 people were killed in religious riots in the northern city of Kaduna.
Some analysts fear that next year's elections may turn violent.
Presidential, parliamentary and local elections are all due before May 2003.
But a federal high court recently ruled that the separate polls did not all have to be held on the same day.