Chancellor Angela Merkel has urged Germans to take a stand against "shameful" anti-migrant protests, on a visit to an asylum shelter which was the focus of clashes at the weekend.
Far-right protesters booed and shouted "traitor" as she arrived at the newly-opened centre in Heidenau near Dresden.
Germany has seen a sharp rise in attacks on asylum centres, as it deals with record numbers of arrivals.
Earlier, police in Hungary fired tear gas at migrants at a reception camp.
They tried to disperse crowds amid unrest at the centre in Roszke, on the Serbian border. Hungary has said it is considering the use of troops to secure the border.
After visiting the centre in Heidenau, Mrs Merkel said Germany was facing a "gigantic challenge".
The country expects up to 800,000 asylum applications in 2015 - more than any other EU country.
"There is no tolerance for those people who question the dignity of others, no tolerance for those who are not willing to help where legal and human help is required," Mrs Merkel told reporters.
She condemned violent protests as "shameful" and "vile".
On a separate visit to an asylum centre in Berlin, President Joachim Gauck praised volunteers who had shown a "bright Germany full of light", rather than the "dark Germany" that arose from attacks on asylum seekers.
Rise in attacks
Dozens of police were hurt at the weekend when neo-Nazis and other right-wing extremists hurled bottles and fireworks.
During Mrs Merkel's visit, protesters outside the centre chanted slogans including "We are the mob", mocking remarks used by Vice Chancellor Sigmar Gabriel when he visited Heidenau.
Most people in Germany are welcoming to the migrants, opinion polls suggest. But a minority are vocally opposed, with a sharp rise in attacks on housing for asylum seekers:
- Police arrested two men who had charged into a shelter wielding knives in the eastern town of Parchim on Wednesday
- A man in the eastern city of Leipzig was seen flinging a Molotov cocktail into a building, which was due to house 56 asylum seekers the same day
- A school sports hall in Nauen, west of Berlin, was burned down on Tuesday
Mrs Merkel's government confirmed on Tuesday that it had decided to consider asylum cases from most Syrian applicants, regardless of how they entered Europe.
It said it was suspending the EU's Dublin regulation, under which asylum seekers must make their applications in the first member state they reach.
Cabinet ministers are also discussing plans to give German regions €500m (£366m) this year to help with influx of people arriving.
Many thousands of people are now following a dangerous route through Greece and the Western Balkans to reach the EU passport-free Schengen zone.
At Roszke, inside the Hungarian border with Serbia, officers used tear gas to quell unrest after migrants at the reception centre refused to be fingerprinted.
The authorities in Budapest have announced plans to send more than 2,000 extra police officers to boost border security. MPs are also set to discuss deploying troops next week.
Bulgaria says it will also send soldiers to its border with Macedonia.
Nils Muiznieks, the Council of Europe Commissioner for Human Rights, criticised both countries' plans as "ill-advised", saying "militarisation of borders is [the] wrong answer to migration".
Hungary is already building a 175km (110 mile) fence in a bid to stop migrants entering.
Officials say a record number of migrants - more than 2,500 - entered Hungary on Tuesday.
The European Commission has announced that it is releasing an additional €1.5m in humanitarian funding to Macedonia and Serbia to help cope with the crisis.