USA – What is the most scenic route from San Francisco to North Rim?

I plan to rent a car at SF and drive for about 2 days to the Grand Canyon (part of it located at Norht Rim).

What is the most scenic route? Is it interesting at all ?? With 2 days to spare, I want to make a few stops in some parks.

Or is it better to go to Flagstaff and rent a car there? And spend the time earned in the GC itself?