SEARCH online for “company incorporation” and you'll be spoilt for choice. Hundreds of so-called formation agents ply their trade online, offering to set up companies, trusts and foundations cheaply and discreetly, with minimal fuss (and in some cases minimal documentation) almost anywhere in the world. The customer need only click on the company desired, perhaps adding some optional extras such as a bank account, an offshore credit card, mail-forwarding or letterhead, and then heads to the checkout. Just £349 ($560) buys you a company in the Seychelles, with no local taxation, no public disclosure of directors or shareholders and no requirement to file accounts. Prices rise to £5,000 for more sophisticated corporate structures in places like Switzerland and Luxembourg.

Bad publicity makes many in the industry gun-shy. Almost all the providers are privately held and reluctant to give details of their trade. But interviews with some big ones (mostly on condition of anonymity) paint a picture of an industry buffeted by a regulatory assault but still churning out healthy returns. It is subject to familiar commercial forces, such as globalisation (the rise of the Asian client) and consolidation (arranged in some cases by buccaneering private-equity firms).

Statistics are scanty. Even totting up the overall number of providers is difficult, partly because some do this only as a sideline. No global industry association exists. But a large offshore financial centre will typically have 80-120 corporate smithies, the World Bank reckons. Delaware, America's market leader, has over 300.

At the top of the market are a dozen or so big operators that pump out tens of thousands of firms a year. Some run call centres with round-the-clock service. Beneath these is a long tail of smaller operators, many of them online, from the legitimate to the thoroughly dodgy.

As in any industry, incorporation includes a mix of wholesalers and retailers. The wholesalers, such as Hong Kong-based Offshore Incorporations Ltd (OIL), sell companies to legal and accounting firms, banks, corporations and also (often in bulk) to web-based resellers. Martin Crawford, the chief executive, says reputation is crucial in this market segment.

The two largest providers offshore may each have 10% of the global market, estimates Jason Sharman, an Australian professor who studies the industry. Onshore markets are more concentrated. Two firms handle two-thirds of all Delaware companies: CT Corporation (part of Wolters Kluwer of the Netherlands) and CSC—though both companies' websites give little hint of this, focusing on their less controversial compliance services.

Among contenders for the top spot offshore is OIL, which has benefited from an Asian fondness for companies from the British Virgin Islands (on paper the second-largest investor in China in 2010, after Hong Kong). It is said to set up more than 10,000 BVI firms a year for Asian clients. Chinese investors use “BVIs” as a synonym for offshore firms.

Also big is OCRA Worldwide, based on the Isle of Man and chaired by Lord St John of Bletso, a hereditary peer and lawyer. It did not respond to requests for an interview. Its website says its 350 employees sell more than 30,000 companies a year in 20 locations, including Mauritius and the Seychelles. Another Isle of Man outfit, ILS Fiduciaries, was more forthcoming. Its boss and majority shareholder, Chris Eaton, says the firm, which specialises in “tax-efficient structures”, operates somewhere between the industry's “stack-‘em-high, sell-‘em-cheap commoditisers” and the high-end private-trust companies, which provide more elaborate services to a more select group of clients. Panama has some big providers too, including two law firms, Morgan & Morgan and the tight-lipped Mossack Fonseca (believed to be an industry leader).

Most of the industry's financial accounts are as impenetrable as the shell companies they peddle, making it “very hard to benchmark performance,” sighs Mr Eaton. He thinks the mass incorporators work on margins of 5-10%, rising to 25-30% for bespoke firms that do advisory work and estate planning.

Returns depend largely on whether the provider offers services beyond straightforward company formation, which tend to boost margins but require more highly skilled staff. Most offer nominee services, meaning their own people will act as directors, legal owners or bank signatories for clients seeking to preserve anonymity. Some also do payroll, invoicing and other “corporate secretarial” services. Pay OCRA an extra $1,300 a year and you can get an e-mail address on an Isle of Man server or call forwarding. Some companies, such as the Netherlands' Orangefield and Intertrust of Switzerland, focus primarily on the corporate-secretarial market. “We tend the garden” that others have planted, says Joep Bruins, Orangefield's boss.

The biggest in the business are said to enjoy annual profits of between $20m and $80m. OIL would not confirm a report that it made $25m before tax and other items in 2009. The number of companies it handles has grown every year since it was founded in the mid-1980s, says Mr Crawford.

An attractive feature of the industry's economics is the annuity-like income generated from renewals. The fee that a client pays upfront covers just the first year. The cost of re-registering the company in each subsequent year is typically 80% of that. Given that the average life of an offshore company is five years, a formation agent taking $500 in year one can expect to receive $1,600 more later (though this must, of course, be shared with the jurisdiction).

This income stream makes the business attractive to private-equity firms, though some remain queasy about investing in a business with a sometimes questionable reputation. Those who have entered the fray say they also like the fact that company formation requires very little capital, allowing juicy returns through leverage. The American-run Carlyle Group was an early investor, buying OIL in 2004 and selling it on last year to IK Investment Partners, a Scandinavian private-equity firm, for an estimated $250m-300m, making what many believe was a large profit. Waterland, a Dutch private-equity group, bought Intertrust from the Dutch government in 2009 for well below the €350m asking price. The government gained the business when it nationalised its parent, Fortis, but hurried to offload a firm that helps the rich to minimise tax bills. Mergers backed by private equity could build larger, more efficient groups. The rising cost of legal compliance and document-management technology burden small providers disproportionately. Larger firms can better cope with clients such as the law and accounting firms that demand discounts when they buy shell companies in bundles. Regulators may also broker forced marriages. The BVI's financial-services commission is said to prefer this to cancelling the licences of errant providers, which could draw unwelcome attention. Though greater regulatory scrutiny means demand may be sagging in parts of the rich world, the industry reports a booming clientele in Asia, Latin America and the Middle East, wanting (among other things) to reduce tax, shield assets and create legally sound structures for international trading and investment. OIL, being Hong Kong-based, was already well placed to benefit. Others have rushed to expand in Asia. Nine of Mossack's 44 offices are now in China. Strong demand from the Far East was a big factor in the rebound BVI enjoyed since 2010, says Robert Mathavious, its chief financial regulator. The Cayman Islands is popular with Asian clients too.