China's President Xi Jinping speaks during the opening ceremony of the 2nd annual World Internet Conference in Wuzhen town Thomson Reuters By Paul Carsten

WUZHEN, China (Reuters) - China will guarantee foreign companies' legal rights, President Xi Jinping said on Wednesday at the country's second annual World Internet Conference in Wuzhen.

"Safeguarding the legal rights of foreign-invested businesses will not change," said Xi. "As long as China's laws are respected, we warmly welcome companies and entrepreneurs from all countries to invest in China."

Despite China's strict controls on online businesses, including requiring firms to self-censor and partner with domestic companies, the world's second largest economy also has the biggest Internet population, numbering almost 700 million people.

The allure of that mass has ensured foreign firms, like U.S. tech giants Google Inc and Facebook Inc , remain eager to break into the market and attempt to turn a profit from China's Internet users.

But critics have raised concerns over a new raft of regulations from China this year. In July, China's parliament published a draft cyber security law which would consolidate Beijing's control over data, with potentially significant consequences for internet service providers and multinational firms doing business in the country.

China's largely rubber stamp parliament in July also passed a sweeping national security law that tightened government control in politics, culture, the military, the economy, technology and the environment.

(Reporting by Paul Carsten and Beijing Monitoring Desk; Editing by Michael Perry)