Costs are rising for America's leading consumer goods companies, and you'll end up footing some of the bill.

Soda, chocolate, cereal and soup could all be more expensive by the end of the year. But paper and cleaning product suppliers may have to eat the costs, blunting the impact to your wallet.

Companies such as Coke (KO), Hershey (HSY), General Mills (GIS) and Procter & Gamble (PG) are flagging that higher shipping and raw materials prices are squeezing profit margins.

Coke said this week that shipping costs in North America have risen 20% from a year ago. That will chip into profit margins later this year.

Related: Diet Coke's new flavors are a big hit

Truck driver shortages and new federal regulations have pushed up the shipping rates Coke pays to deliver sodas to retailers. The company cited a new rule requiring drivers to log their hours on the road electronically to limit driving to a maximum of 11 hours at a time.

A spike in aluminum prices is also hitting canned-drink producers.

On Wednesday, Dr. Pepper Snapple (DPS) reported tighter margins last quarter than Wall Street expected. Barclays analyst Lauren Lieberman attributed the drag to more expensive aluminum.

Aluminum accounts for 20 to 25% of Monster's (MNST) costs, and Stifel analyst Mark Astrachan predicted in a report earlier this week that Monster will raise prices around 1.5% on its energy drinks to protect margins.

Related: Look out Red Bull. Monster is flying

For Hershey, steep cocoa prices could cut into its chocolate profits. Cocoa is up more than 40% over the past year from a production slowdown in the Ivory Coast after record production in 2017, explained commodities analyst Shawn Hackett, president of Hackett Financial Advisors. Consumers can expect to see higher chocolate prices at stores later in the year, Hackett said.

Hershey reported Thursday that higher shipping and commodities costs will shave off 1.25% on its margins compared to last year.

Related: Kiss of death? Healthier eating and surging cocoa prices are hurting Hershey

Other food companies are feeling the commodities crunch, too.

Cheerios and Wheaties maker General Mills said last month that higher costs for grains, fruits and nuts and shipping will raise production costs by 4%.

General Mills CEO Jeffrey Harmening told analysts that the company would respond in part by hiking prices.

Campbell Soup (CPB) and Kellogg (K) will face the sharpest rise in commodities prices among US food producers, Bernstein analysts predicted in a report earlier this month. Campbell's inflation costs will rise 6% during the next year from a spike in wheat, while rising grain prices will push Kellogg's cost inflation to 4% this year, the analysts estimated. Both report earnings later this month. Campbell has also publicly warned that President Trump's tariffs on steel could result in higher prices.

Higher commodity prices pose yet another challenge for established food names struggling to remain top choices for shoppers and convince Wall Street that their best days are still ahead.

Related: Why Kellogg isn't giving up on sugary cereal

Big food will attempt to pass off the costs to retailers, but they will have trouble in a brutal pricing environment. Retailers and grocers face intense competition from Amazon on one side and discount stores on the other to keep prices down. That could keep a ceiling on prices.

A run-up in costs may hit household goods manufacturers like P&G, Unilever (UL), Clorox (CLX) and Huggies-maker Kimberly Clark (KMB) hardest.

A mix of factors is already hurting the companies' ability to control prices and maintain market share: upstart online brands, the growth of retailers' private label brands and a fractured shopping landscape.

Related: Gillette and Tide maker struggles in 'tough environment'

Now, chemicals and raw materials used for making and packaging toothpaste, shampoo, paper towels, trash bags and detergents are more expensive, Morgan Stanley analysts wrote in a report last week.

"Pricing power is diminishing at the same time as commodities are ramping up," the analysts said.

P&G's Gillette razor blade production costs will rise 30% due to higher steel prices, while 28% higher caustic soda prices will dent margins on Ivory soap and Old Spice deodorant.

Related: Gillette unveils new, cheaper razors to keep Dollar Shave at bay

Kimberly Clark said this week that cost inflation this year will be up to $150 million more than it expected only three months ago primarily because of higher pulp costs.

But pushback from retailers to keep prices low will limit these companies from passing off higher costs to consumers, Morgan Stanley said.