FRANKFURT--German companies fear rising costs and higher complexity for their businesses should the U.K. vote in favor of leaving the European Union on June 23, a survey conducted on behalf of Deloitte and Germany's main industry association, BDI, showed Wednesday.

"German industry's uncertainty about future business relations with the U.K. is palpable," said Markus Kerber, head of BDI.

Almost half of the 215 enterprises surveyed, representing various sectors, anticipate increased complexity and higher costs because of potentially new and divergent regulations between the U.K and the EU. About 33% said Brexit would force them to review their entire supply chains for reorganization, while around 40% fear higher customs duties for German companies.

Roughly 70% of companies surveyed said they expected uncertainty on financial markets.

U.K. Chancellor George Osborne has warned that Brexit could push the U.K. economy into recession. Analysts warn that such a scenario and a potential decline in sterling would hurt companies that repatriate revenues made in the U.K., including German utility RWE AG, Deutsche Post AG and car maker BMW AG.

Most German companies have declined to speculate on Brexit, calling it a U.K. political matter.

But BMW AG Chief Executive Harald Krüger has said there could be consequences for the company's workforce in the U.K. and called the possibility of Brexit "regrettable."

About 30% of the firms were certain that Brexit would have a negative impact on their business, while two-thirds said they weren't able to assess potential impact.

Only 7% of companies said they expected a positive effect on their business, and few have taken measures to alleviate or account for any impact, possibly because 66% expect the U.K. to vote in favor of remaining in the EU.

"Surprisingly, only 29% of firms have prepared themselves for the situation -- the financial sector in particular," said Alexander Boersch, chief economist of Deloitte.

Among the potential risks German companies could face are fewer opportunities for export. Companies would also be likely to have to review their investments, Mr. Boersch said.

About half of the companies surveyed export goods to the U.K. or have a branch in the country. The remaining firms rely on U.K. imports or are dependent on a U.K. production site.

Some 55% of the companies generate sales of more than 1 billion euros ($1.14 billion). About one-third represent the manufacturing industry, while 22% are from the financial sector.

Write to Natascha Divac at natascha.divac@wsj.com