Three routes spring to mind :
1) From Whiterun - go south to riverwood - and then to Helgen. If you creep around helgen you should be able to get to Ivarstead safely - but that is risky. Don't go through Helgen though.
2) From Whiterun - follow the main road to the north of the "Throat of the world" - If you stay on the main road, you should only meet one encamped set of bandits - in the tower - and there is a path over the mountain which you can use to avoid them, although that could be more risky. You might meet one or more bandit teams, or wild animals on the main road, but they should be levelled and beatable.
3) From Riften - catch the coach to Riften, and walk from there. but I guess that route will have the same bandit issues.
If you have Dawnguard DLC enabled, then you will also face random vampire attacks - I find that a ranged weapon (bow & arrow, or a magic staff) is the best strategy here. If you try to melee them they can be very very difficult, even when they are levelled to you (which all random attacks should be).