Inflation can be a scary ordeal for dividend payers, just like it can be for investors. When companies face rising prices and diminished consumer demand, it compresses their margins -- and with thinning margins, it's hard to justify paying a dividend or raising the payout that investors expect. 

So if you want to build your dividend income despite inflation, you'll need to pick the sturdiest businesses around, and preferably those that have a history of paying out even when economic times are tough. Companies that get even stronger during periods of inflation are even more appealing. Let's examine a pair of stocks that fit these two criteria swimmingly.

1. Abbott Laboratories

Abbott Laboratories (ABT 0.49%) isn't struggling with inflation, because its biggest customers are healthcare systems rather than consumers. Though the company's recent issues with producing enough baby formula may have made the news, the problems weren't caused by inflation, but rather quality control issues, and its top line is holding strong. Its quarterly profit margin is still around 17.9%, which is near its three-year high of just over 20%.

And with hospitals everywhere counting on Abbott to supply diagnostic tests, medical devices, surgical tools, and branded generic medicines, it isn't about to see dropping demand anytime soon. In fact, its new glucose monitor, the FreeStyle Libre 3, is already being distributed in 60 countries less than three months from its launch in the U.S., and it's expected to be a significant driver of growth moving forward.

Over the past five years, quarterly net income has grown by 234.7%, reaching more than $2 billion, so the company also performs quite well even when economic conditions are more favorable.

Abbott Labs' burgeoning product portfolio is part of the reason it can keep hiking its dividend year after year, which should also give investors confidence in its ability to keep performing strongly during periods of inflation. After 50 years of increasing its payout every year without fail --  earning it the status of Dividend King -- it's safe to say that prior bouts of inflation weren't much of an obstacle.

Its dividend presently has a forward yield of around 1.7%, which isn't particularly high, nor is the payout's most recent increase of 4.4% going to change much for shareholders. But management opted to raise it by a whopping 25% at the end of 2020, so investors shouldn't need to worry about the pace of increases picking up again as economic conditions allow.

2. Costco

Costco Wholesale's (COST 1.01%) approach to inflation is a bit more price-driven than Abbott Labs'. Costco's business model is to sell consumer goods and groceries at wholesale prices to customers, from whom it also extracts a membership fee, so it needs to be very price sensitive. When consumers are facing inflation and hunting for a bargain, they go to Costco.

So if management opted to raise prices as aggressively as might be warranted to maintain its razor-thin margin near 2.6%, it could destroy demand. But if Costco keeps prices as low as possible, it could actually sell more goods in an inflationary or recessionary environment than it would otherwise -- and that's exactly what's happening

In June, the wholesaler's revenue grew by 20.4% compared to the same month a year ago, totaling nearly $22.8 billion. For the year so far, the same trend holds, with sales rising by an impressive 16.9%. That means inflation is indeed driving consumers to buy more with Costco, which implies it shouldn't have any trouble continuing to pay and raise its dividend. 

On that note, its forward yield is paltry, at just below 0.7%. Still, over the last 10 years, its dividend has grown by an impressive 227%, punctuated by four giant special dividends as a bonus. And as long as people keep turning to Costco for well-priced bulk groceries, clothes, home goods, and the cornucopia of other products and services it offers, inflation won't be a concern, and it'll continue to grow without incident.