Taiwan Rallies Against China Law
Protesters sang and carried banners proclaiming peace and democracy at a rally outside the presidential palace.
Beijing sees Taiwan as a breakaway province and claims territorial rights.
Taiwanese President Chen Shui-bian attended the protest, which was largely organised by the governing Democratic Progressive Party, but did not make a speech.
Analysts say he is aware the rally has already provoked anger in Beijing and did not want to inflame the situation still further.
The BBC's Chris Hogg, in Taipei, says the organisers wanted to remind the international community that Taiwan has a grievance - and the massive turnout meant the message was loud and clear, and hard to ignore.
Taiwanese Foreign Minister Mark Chan said he was impressed by the numbers of people who had turned up.
"It points to the fact I think our people are quite determined to speak out," he told the BBC.
"The passage of the anti-secession law is not going to be accepted by the international community, and particularly not by the people here in Taiwan."
Vivian Wang, a 38-year-old restaurant worker, told the Associated Press news agency: "Taiwan is only a small island, so we must speak out really loud to make the world hear that we are a democracy facing an evil giant."
No Taiwanese opposition politicians took part in the protest,
which they said would not help ease tensions with the mainland.
In China, state media quoted Wang Chinping, president of the China Foundation of Taiwan, as describing the demonstration as a "political carnival organised with public money".
It went on to say the rally had caused serious congestion on main roads in Taipei , provoking complaints by the local population.
The island of Taiwan, just 160km (100 miles) off China's southern coast, has resisted rule from Beijing since the communists took over the mainland in 1949. It counts the US and Japan as key allies.
In Hong Kong, about 100 people marched through the streets in support of the Taiwanese protesters.
Source: BBC News