Unilever, Beiersdorf and L'Oreal are among the multinationals converting their supply chains for the world's biggest Muslim-majority nation.
The law, the first of its kind, requires food to be labeled halal or not in 2017, followed by toiletries in 2018 and medicines in 2019.
The companies say demand for beauty products that are halal, or target specific issues like veiled hair, will grow as the Muslim middle class grows. They note that Indonesia could influence other countries such as Malaysia where halal products made locally or by small, niche companies are also popular.
Halal certification is official recognition that a product was manufactured in keeping with Islamic Sharia law. This means it must not contain traces of pork, alcohol or blood, and must be made on factory lines free of contamination risk, including from cleaning.
Makers of cosmetics and toiletries say the burden is more administrative than financial, and therefore see compliance as unlocking new revenue streams.
"It's an enabler to do business in certain areas of the world," said Dirk Mampe of German chemicals company BASF, which sells ingredients to toiletries manufacturers and now has 145 of them certified halal. The halal ingredients do not carry premium price tags, he said.
"There is a trend that these halal products are being requested more and more, and the importance of being able to supply them is increasing."
More than 1.5 billion people around the world are Muslim, accounting for about a quarter of the global population.
Halal cosmetics were estimated to make up 11 percent of a global halal market worth more than $1 trillion in 2015, according to Deloitte Tohmatsu Consulting. Market research firm TechNavio sees halal personal care products' sales growing 14 percent per year until 2019, outpacing the broader market.
French cosmetics giant L'Oreal already has a halal-certified factory in Indonesia that supplies the domestic market and its Southeast Asian neighbors. Most products under its Garnier brand, from face washes to skin lightening creams, are halal-certified, a spokeswoman said.
The personal care industry already depends largely on plant-derived ingredients, so the rules for halal often affect production more than formulation.
But certification can get complicated. For example, the maker of an Indonesian skin cream with a dozen ingredients from around the world would need to give Indonesian authorities proof from other certification bodies that each ingredient was made in a halal way.
Malaysia-based DagangHalal has made a business from that complexity by establishing an online database of halal certificates to ease their exchange and expedite the process for applicants. As of February, it said 38 out of over 120 certification bodies worldwide had signed up.
The company, which also runs a halal e-commerce site, reported 2015 revenue of 5.6 million Malaysian ringgit ($1.4 million), up 64 percent year-on-year. It raised 3.6 million pounds ($4.7 million) from this year's London stock listing, and is betting that halal cosmetics will gain traction beyond their current strongholds of Indonesia and Malaysia.
"Halal certification is a requirement that might be put in place by other countries in the future," Joerg Karas, general manager of Schwan-Stabilo Cosmetics, said in a statement last month. The German company, which is ready to offer halal-certified products to customers such as L'Oreal and Procter & Gamble, said it is "well-equipped for this niche market".
Non-halal products will remain available in Indonesia following the labeling law, but may meet a backlash.
"The average Muslim consumer in Indonesia is not going to buy something that effectively says prohibited on it," said Abdalhamid Evans of halal consultancy firm Imarat Consultants.
Unilever, which owns five of Indonesia's top ten beauty and personal care brands, says all nine of its factories there already meet halal standards and that it is currently working with third-party suppliers of imported ingredients.
Alan Jope, who runs Unilever's personal care business from Singapore, told Reuters the cost of certification was "not material".
Competition with homegrown rivals steeped in local tradition can be fierce, especially when it comes to regulation. But Jope said the key for multinationals like Unilever -- with global marketing and development teams -- is understanding Muslim values generally and how they influence habits in specific markets with different cultures and ethnicities.
"Some (values) are common across Muslim countries," he said, noting that about 90 percent of Muslim consumers say faith influences their brand choices.
"But there's quite substantial differences between how a Muslim woman in Indonesia and a Muslim woman in Saudi Arabia express their faith and how that impacts their beauty regimes."
He guessed that one third of the top twenty markets for Unilever's 20 billion euros-per-year business were countries with large Muslim populations, from India to Nigeria. He said better meeting their needs was a top strategic priority.
To that end, Unilever has introduced products such as a gel body moisturizer that absorbs quickly beneath long undergarments and a long-lasting toothpaste appealing to those fasting for Ramadan.
Like rival Henkel, it sells a line of shampoo for veiled hair, but Jope said the industry needs to improve its advertising, such as by featuring more women in hijabs.
"We need to be doing a better job reflecting Muslim values in our brand communication," he said.
($1 = 4.0480 ringgit)
($1 = 0.7614 pounds)