By Eun-Young Jeong in Seoul and Paul Hannon in London

Factory activity around the world showed further signs of recovery in June as governments eased restrictions designed to contain the coronavirus, but weak demand still weighed on production and employment, according to surveys of purchasing managers.

In the U.S. and Germany, manufacturing activity declined at a slower pace, a sign that the global economy is starting to rebound from a deep contraction, according to IHS Markit, a firm that produced many of the surveys. Manufacturing sectors returned to growth in a number of other countries, including France, the U.K., Malaysia, Vietnam, Australia and Ireland.

"We certainly have a recovery," said Patrick Artus, chief economist at French bank Natixis. "In June, the recovery seems to be faster than we expected."

While businesses reported that the lifting of restrictions had made it possible to ease up on layoffs and get supplies or raw materials, they said weak demand from overseas was holding them back.

The U.S. purchasing managers index for manufacturing in June posted 49.8 in June, a record rise from 39.8 in May, indicating that the rate of decline had slowed considerably, according to IHS Markit.

Readings below 50 indicate contraction and readings above 50 indicate expansion.

Respondents to the U.S. survey said they saw demand stabilize in June, which made them optimistic about future prospects. And while manufacturers continued to reduce their workforce, the rate of job losses slowed considerably, the firm said.

Export orders continued to weaken, however, which respondents said could be due to the fact that some of their overseas markets remain in lockdown.

"U.S. manufacturers have reported a marked turnaround in business conditions through the second quarter," said Chris Williamson, chief business economist at IHS Markit. "A record upturn in business sentiment about the year ahead likewise hints that business spending and employment will start to revive."

Mr. Williamson added an uptick in coronavirus cases in some parts of the U.S. could cause demand to weaken again. And around the world, production and sentiment are still below their pre-pandemic levels, which could drag down the recovery, he said.

A separate survey by the Institute for Supply Management released Wednesday showed that manufacturing activity expanded slightly in June, posting 52.6, up from 43.1 in May. That was the strongest one-month increase since August 1980. New orders posted the strongest monthly gain since records began in January 1948, IHS said.

"We've entered an expansion cycle," said Timothy Fiore, who runs the IHS's manufacturing surveys. "The big question has always been what will the expansion cycle look like."

China is the global economy's manufacturing powerhouse and was the first major economy to ease its lockdown, having been the first to fall victim to the virus. The June survey of purchasing managers pointed to an acceleration in activity, a path that other countries will hope to follow in coming months.

For Kaiterra, an air-quality-tracking-device maker whose manufacturing base is in Shenzhen, China, getting finished products to customers' doorsteps has been one of the biggest challenges this month after production finally returned to pre-coronavirus levels.

"We're spending a lot more of our time on logistics just trying to help people find better [shipping] deals," said Liam Bates, Kaiterra's chief executive.

Demand for the Switzerland-based company's devices has skyrocketed this year as a result of the pandemic, which increased some people's concerns about air quality.

The company has turned more to sea shipments after airfreight prices surged and it faced wait times of more than two weeks to get packages on flights.

Logistical challenges have also increased the cost of obtaining components. The supply side has been less of a headache, said Mr. Bates, adding that the boost in sales helped the company to offset the higher shipping costs.

"What's unusual about this pandemic is everyone is in the same boat. We all know that something crazy is going on," said Mr. Bates.

While logistical bottlenecks are being cleared, other factories are encountering what is potentially a larger problem: weak demand.

"We had no issues at all getting components, but we didn't get orders from our customers," said Park Jong-jin, head of the planning team at YoungjinIND Ltd., a semiconductor-equipment manufacturer.

The Icheon, South Korea-based company had previously halted production when orders dried up in February and March. The company had to temporarily transfer all its manufacturing staff to take on maintenance and repair roles. Manufacturing restarted in June as new and delayed orders began trickling in.

Data releases over recent weeks have pointed to a rebound in consumer spending in a number of large economies, including the U.S. But retailers appear to have met that surge in demand from existing stocks, with little sign of a boost to factory orders.

Germany is Europe's largest manufacturer, and figures released Wednesday by its statistics office showed a 13.9% increase in retail sales between April and May. But the country's survey of purchasing managers at factories recorded a continued fall in new orders during June.

Factories have responded to shrinking order books by laying off workers. Rising unemployment is likely to weaken demand further, threatening a vicious cycle. That suggests governments and central banks are likely to add to their existing stimulus measures to ensure that the recovery proceeds smoothly and the global economy avoids a double-dip recession.

Write to Eun-Young Jeong at Eun-Young.Jeong@wsj.com and Paul Hannon at paul.hannon@wsj.com

Corrections & Amplifiations

This item was corrected at 3:38 p.m. ET. An earlier version misstated the name of IHS Markit as ISM Markit.