The Spaniard had dropped only six games in swatting aside Jared Donaldson and Diego Schwartzman in previous rounds and although his unseeded opponent more than doubled that tally, there was little danger of the three-time champion failing to reach the quarter-finals.
World number 113 Krajinovic was aiming to become the first qualifier in 16 years to make the last eight at this tournament, but he was simply outclassed by the 17-time major winner.
Nadal, last victorious at Indian Wells in 2013, was able to cruise into this year's quarters, where he will meet the winner of John Isner's match against Karen Khachanov.
The favourite was quickly into his stride as Krajinovic netted a simple forehand to give up a break and fall 2-0 behind but the Serbian, a Paris Masters finalist in 2017 before an injury-riddled 2018 campaign, was back on serve at 3-2 when Nadal went long with a backhand.
Nadal immediately regained the ascendancy, though, as Krajinovic erred in similar fashion and the Spaniard served out the set to love with an ace down the middle.
A stunning inside-out forehand to end a lengthy rally handed Nadal the advantage at 2-1 in the second and that solitary break was all he needed as a routine triumph was wrapped up with a ruthless forehand down the line.