At the end of their shifts in restaurants all over the world, cooks roll up garbage barrels to their work stations. Into the cans goes a lot of unsold prepared food — noodles and meats and chicken and lettuce and tomatoes and rolls and what have you.

But what if this still-delicious food instead could be portioned into takeout containers, marketed on the fly, and sold at a deep discount to savvy customers that day — and not wasted?

This is the question answered by Too Good to Go, an organization starting officially in Philadelphia this week after building a following in Europe. We throw away one-third of the food we produce, the organizers say; why not make it easy to combat the issue?

TGTG’s app links food businesses to consumers. The retailers — restaurants, bakeries, and caterers — sell their surplus food, while consumers get a meal at a good value, says the company.

It’s billed as a win for everyone: the business, the consumer, and the environment.

Businesses do not pay to participate, so they are not on the hook with up-front costs. TGTG keeps $1.39 per order, and there’s a $59 annual fee that is deducted from the restaurant’s account. The fee is waived for the first year if a restaurateur refers three other businesses that sign on.

Consumers don’t know what they’ll get — only that the food will be wholesome and valued at about one-third of retail. One early participant, Balboa Catering, for example, had extra product from a demonstration, and on Monday sold a couple of boards, including cheese, charcuterie, house-made jams, crackers, and cornichons, for $10.

Six years ago, cofounder Lucie Basch was a French-born engineer working for Nestle in Switzerland on the food giant’s manufacturing efficiency. “That’s when I realized that the way we produce food today is pretty insane,” she said last week from her new base in New York City.

“I mean, we don’t think so much about the impact on the consumer’s health or the impact on the environment,” she said. “What matters is to produce as fast as possible, as cheaply as possible. Toward that process, you actually end up creating a lot of waste. But as long as the line can run as fast as possible and if the marginal cost can decrease, that’s still a good improvement.”

That turned Basch’s thoughts to combating waste. “The food industry is a big one, and the power of technology is really there,” she said. “You can connect the right people at the right place so that they work together on solving an issue. That was the whole intention behind the app. I then quit my job at Nestle and started looking for developers. I found some people that were actually working on a similar project in Scandinavia.” (This explains her proficiency in Norwegian, according to her LinkedIn profile.)

Too Good to Go started in six countries in Europe, quickly spreading to 14 countries and saving more than 60 million meals. TGTG landed in the United States (Boston and New York) about four months ago, and after Philadelphia’s launch will add Washington, D.C., and San Francisco.

The free app maps the day’s participating food businesses, the price of the surprise bag (typically about $5), and the designated pickup window (typically the end of the business day). Businesses can make as few or as many bags as they want, based on leftovers.

To sell the service in Philadelphia, TGTG brought in two food veterans, Abbe Stern and Andrew Erace.

Stern, well known in the local food-waste world and the founder of Fooding Forward, said she had heard of TGTG two years ago on Instagram. Stern said Cheyenne Pritchard of Philabundance called her recently and said, “I saw this [job] posting that’s super up your alley.” When Stern heard that it was TGTG, she said she leaped at the opportunity, interviewed, and landed the job soon after.

Erace, who with his brother, Adam, owned Green Aisle Grocery, which closed in early 2020, said he wanted to be aligned with “a forward-thinking organization that was making a difference in the world while still keeping me in the food industry.”

“My prior life, I worked in tech and that space is where I wanted to return full time,” he said. “TGTG encompassed all those things.”

TGTG, which for now is signing up food businesses primarily in Center City and nearby neighborhoods, works within the margins of the food donation ecosystem. Many charities won’t touch prepared foods because of the perishability. Many also won’t send a truck to a restaurant to fetch a comparatively small amount of food — such as several pounds of misshapen dumplings, 10 extra rolls, or a pan of sauced beef that might not be at its peak the next day.

Ordinarily, such food might be taken home by employees, eaten by employees, or “thrown out — but don’t let the boss see,” said Ian Natowsky, owner of Yellow Bicycle Canteen in Washington Square West.

Yellow Bicycle and several other restaurants started offering bags before the official launch. Natowsky said he has included an assortment from his vegetarian menu: a garden quiche bagel, house greens, potato salad, and quinoa tabbouleh.

The first to sign on was Baology, the Taiwanese shop near Logan Square. Also online now are Mac Mart, the Rittenhouse mac-and-cheese specialist; Bakeshop on 20th, a bakery near Rittenhouse Square; Rival Bros. coffee’s locations; South Philly Food Co-Op; and OK Produce at Reading Terminal Market.

At Fitz & Starts in Queen Village, owner Pat O’Malley’s surprise bags have included three or four pastry items, such as canelés, almond croissants, scones, and biscuits with jam. O’Malley said he may include specials, or even menu items he is developing.

Hardena, an Indonesian restaurant in South Philadelphia, has sold off the extra items from its “not pizza” box, including sauteed mushrooms, string bean and tofu in fermented soybean sauce, quail eggs in red pepper sambal, jasmine rice, and a vegetable fritter. “It’s a nice idea to save on food costs, instead of throwing away or eating the extra,” said Diana Widjojo, a chef and owner.

The $4.99 surprise bag on Sunday from Crunchik’n, a Korean takeout in Washington Square West, included a to-go box with two fried dumplings, a mound of bulgogi, plenty of japchae noodles and white rice, and pickled vegetables — more than enough to feed a person. Popcorn chicken filled a second container, and the bag contained a shrink-sealed cup of passion fruit tea with boba (the tapioca bubbles cannot be saved).

Jen Choi, who owns Crunchik’n with her father, John, said she joined because “it seemed like a good way to use foods that we would throw away.”

“I never heard of them till they walked in. It sounded spot-on,” said Natowsky, at Yellow Bicycle. Any downside could be the cost of labor — plus packaging — but “feeding people is great energy,” he said.

The deals also can be considered a calling card, attracting deal-seekers who might be unfamiliar with a business. “People experience your [menu] at a reasonable cost and you can showcase your vision without heightened expectations,” Natowsky said.