An inflationary tide is beginning to ripple through America's supermarkets and restaurants, threatening to end the tamest year of food pricing in nearly two decades.

Prices of staples including milk, beef, coffee, cocoa and sugar have risen sharply in recent months. And food makers and retailers including McDonald's Corp. , Kellogg Co. and Kroger Co. have begun to signal that they will try to make consumers shoulder more of the higher costs for ingredients.

For food executives, how quickly to pass along higher costs presents difficult choices. Missteps could be costly when the economy remains weak. Many Americans, nervous about high unemployment, have pledged allegiance to their pennies and are willing to trade down on brands, switch supermarkets, opt for Burger King over Applebee's, or stop dining out altogether to save money.

"The big challenge will be, how much can we swallow and how much can we pass along?" said Jack Brown, chief executive of Stater Bros. Markets, a 167-store grocery chain in Southern California.

Stater Bros. has seen the prices it pays for cereal rise 5% in recent months. The chain has passed about half the increase on to consumers while making up for the rest by trimming other expenses, such as what it spends on cell phones and delivery truck tires.

Kraft Foods Inc., Sara Lee Corp. and General Mills Inc. already have said they'll raise prices on certain items. Starbucks Corp. backtracked on an August announcement that it would hold coffee prices steady, saying in September it would boost prices of larger and hard-to-make drinks. This week, cereal maker Kellogg hinted that it will be raising prices, without disclosing specifics.

Grocery chains Safeway Inc. and Kroger have said they'll pass supplier increases along to consumers.

Domino's Pizza Inc. is letting consumers decide whether they're willing to pay more. The company is offering two medium, two-topping pizzas for $5.99 each but has recently offered the option of converting one of them to a premium pizza, with more toppings, for an extra $2—a price increase, in effect.

BJ's Restaurants, a casual-dining chain, plans to raise prices early next year by about 2.5%—but only after upgrading its table settings and decor. "In this business, you can't just raise prices without improving the overall dining experience," BJ's chief financial officer Greg Levin said in October.

Costs are being driven by growing demand for meat in China, India and other emerging markets. That's driven up grain prices, which in turn boost the cost of chicken, steak, bread and pasta. Grain prices also have been nudged higher by drought in Russia, planting problems around the world and speculative trading.

Food prices are rising faster than overall inflation. The consumer price index for all items minus food and energy rose 0.8% over the year to September, the lowest 12-month increase since March 1961, the Bureau of Labor Statistics said. The food index rose 1.4%, however. The U.S. Agricultural Department is predicting overall food inflation of about 2% to 3% next year.

The current pressure is nothing like it was in October 2008, when food prices were rising at an annual rate of 6.3% and some hard lessons were learned when producers passed along those costs: Shoppers switched to private-label products.

For now, Weis Markets Inc., a 164-store grocery chain based in Sunbury, Pa., is holding firm. For the past two years Weis has maintained a "price freeze" on 1,500 staple items. "If we can hold on to the lower prices until the end, and be the last to move up, it's worth being patient," said chief executive David J. Hepfinger.

Wal-Mart Stores Inc. executives told investors last month that they expect "very moderate" inflation next year. For now, Jack Sinclair, Wal-Mart's executive vice president of grocery merchandise, said it would be "difficult" to hike retail prices because demand remains weak.

McDonald's chief financial officer Pete Bensen recently told investors he expects costs to rise 2% in the U.S. and 3% in Europe next year.

"The question will be exactly at what point will we be able to take some of that pricing," he said, adding that the burger chain is likely to raise menu prices sometime next year. The last time McDonald's raised menu prices in the U.S. was in the fourth quarter of 2009, with a 1% increase over the year-earlier period.

Worries aren't all on the low-end. Gibsons Bar & Steakhouse, a three-unit chain in the Chicago area, said that in the last four months, the price it pays for a New York Strip steak rose to $23 per pound from $19 per pound. It's reluctant to pass that cost along. "I think there's a ceiling on how much people are willing to pay for a meal and for an individual piece of steak," said Gregg Horan, Gibsons' director of operations.

—Timothy W. Martin contributed to this article.