Portraying himself as a tough realist as France faces a crisis "unknown since World War II" and dismissing frontrunner François Hollande as a dreamer, Sarkozy said he felt it was his duty to seek a new five-year term.
"Yes, I am a candidate in the presidential election," Sarkozy said in an interview on France's TF1 television.
"I took this decision because France, Europe and the world have for the last three years seen a series of unprecedented crises, which means that not seeking a new mandate from the French people would be abandoning my duties."
Sarkozy presented himself as "the captain of a boat in the heart of a storm" and promised: "The French people must understand that if France is strong, they will be protected. France is a shield for each of us."
Sarkozy slammed Hollande's left-wing campaign programme, which promises significant state spending and the creation of thousands of teaching jobs.
"Do you really believe that in the current economic climate, we can tell the French people that we do not need to make savings?" he said.
"In my long political career I have seen many people promise a dream. Those dreams always turned into nightmares," he said, directly attacking Hollande's pledge to revive "the French dream".
Hollande had pre-empted Sarkozy's declaration by staging a massive campaign rally in his hometown in Rouen, televised live just minutes before the president's interview. He lashed out at Sarkozy's record.
"The script has been written: the incumbent candidate will promise new things. He will try to turn his weaknesses into strengths. He has been wrong for five years and now he calls that experience," Hollande said.
"He'll pretend that a diet of austerity is a 21st century solution, that we must forget his record, that the crisis has passed, everything is forgotten, that only the future counts," Hollande said.
Sarkozy, 57, has been operating on a de facto campaign schedule of television appearances and twice-weekly regional tours for months now, but had yet to officially confirm his candidacy.
Opinion polls consistently forecast that Sarkozy will be beaten by Hollande in a run-off on May 6th, but the president's camp is clinging to hope that he can rekindle the energy that brought him to office in 2007.
Sarkozy's programme combines the most modern tactics -- he launched a Twitter account on Wednesday -- with the most traditional -- he was due to visit a provincial cheese factory in the Alps on Thursday.
After the trip to the Annecy cheese plant, he will hold a large set-piece rally in the southern port city of Marseille on Sunday.
The French left has not won a presidential election since 1988, but former Socialist Party leader Hollande, 57, has a comfortable lead in the surveys of likely voters.
The latest poll published on Wednesday by Harris Interactive for the news magazine VSD forecast that Hollande would win the first round with 28 ercent to Sarkozy's 24 percent then sweep the run-off with 57 percent to 43.
In this poll the only other candidate within striking distance of the second round would be far-right National Front leader Marine Le Pen on 20 percent, but most observers now see the campaign as a two-horse race.
Brandishing a red card like a football referee expelling a player, Le Pen urged her supporters to teach Sarkozy a lesson at the polls.
"There have been too many betrayals, too many lies, too much manipulation, Nicolas Sarkozy must leave the pitch and give way for a bold, enthusiastic, courageous and clear-headed team, mine!" Le Pen said.
Sarkozy began his time in office vowing to liberalise the economy, reduce unemployment and increase voters' spending power, but has instead seen France fall prey to the eurozone debt crisis.
He did have some good news on Wednesday: economic growth in the final quarter of last year was confirmed as having been slightly higher than first thought, and thus France is not officially in recession.
But in an interview last week, Sarkozy focused on a conservative social platform rather than on the economy, with plans to ban gay marriage and adoption, limit immigration and restrict unemployment benefits.