"Do you think I enjoy doing this reform? No," Macron said in a rare TV interview. "But there are not a hundred ways to balance the accounts ... this reform is necessary."
Polls show a wide majority of French are opposed to the pension legislation, as well as the government's decision to push the bill through parliament last week without a vote.
But Macron said he would stand firm.
He said he was prepared to accept unpopularity as a consequence of imposing a controversial pensions reform that has sparked uproar and protests.
"Given a choice between opinion polls in the short term and the general interest of the country, I choose the general interest of the country," Macron said in a televised interview.
"If it is necessary to accept unpopularity today I will accept it," he added, while acknowledging he had "not succeeded in convincing" the country over the reform.
Addressing public unrest over the pension change, "Between the short-term polls and the general interest of the country, I choose the general interest.... we will not tolerate any misbehavior," he said.
Until the government pushed the pension bill through parliament, the protests against a bill extending the retirement age by two years to 64 had gathered huge, peaceful crowds in rallies organized by unions.
But since the government's decision to skip a parliamentary vote last week, spontaneous protests in Paris and elsewhere have seen rubbish bins and barricades set ablaze every night amid scuffles with police.
Protesters on Wednesday also blocked train stations in the southern cities of Nice and Toulouse.
"We don't want this law and we'll fight until it is withdrawn," pensioner Jacques Borensztejn said at a rally on Tuesday in Paris.
Labour unions have announced another nationwide day of strikes and demonstrations on Thursday.
This, alongside with rolling strikes that affect oil depots, public transport and garbage collection, represent the most serious challenge to the centrist president's authority since the "Yellow Vest" revolt four years ago.
This report was sourced from Reuters and Agence France-Presse.