Hi Lornash,
Lets take a look at your plans - for a 21 day rail pass to be economical, you need to spend ¥57,700 on JR rail tickets in your trip.
- Tokyo > Nikko: ¥5430, (121mins, 150km)
- Nikko > Odawara: ¥8990, (161mins, 233km)
- Odawara > Takayama: ¥12410, (239mins, 448km)
- Takayama > Kanazawa: ¥4180, (186mins, 148km)
- Kanazawa > Osaka: ¥7440, (154mins, 267km)
- Osaka > Kyoto: ¥540, (29mins, 42km)
- Kyoto > Nara: ¥690, (44mins, 41km)
- Nara > Kyoto: ¥690, (47mins, 41km)
- Kyoto > Himeji: ¥5130, (62mins, 130km)
- Himeji > Kyoto: ¥2210, (91mins, 130km)
- Kyoto > Hiroshima: ¥10790, (109mins, 380km)
- Hiroshima > Tokyo: ¥18050, (292mins, 894km)
TOTAL: ¥76550 for 12 legs
Based on these costs I can certainly recommend a 21 day rail pass for a total saving of ¥18,850 if you were unable to alter your travel plans at all and wanted to be 100% prepaid.
You could actually fit all your travel into a 14 day rail pass if you changed your return date to Tokyo to the 29th of April rather than 30th. This would require a small alteration to your plans, but a 14 day pass (¥45,100) would result in a total saving of ¥31,450 - maybe you could spend it on a nice hotel or amazing meal!
As a final alternative, if you didn't mind paying for your trip to Nikko (¥5,430), and not having the flexibility of the 21 day rail pass you could also do your travel on a 14 day rail pass with no alterations by starting a 14 day rail pass on the 18th to Hakone/Odawara (¥5,430 + ¥45,100 = ¥50,530). This would give you a great saving of ¥26,020 and not require any changes to your itinerary.
You can book JR-East trains online, however for other parts of the JR network you will unfortunately need to reserve once you are in Japan on presentation of your JR Pass. Please note that he JR-East online reservation requires you to pick up your tickets 1 day in advance of travel at the latest or you will be charged for the reservation (you will need to provide credit card information when you make your online reservation).
I hope this helps!
P.S For Hakone, from Odawara you will need to use the Odakyu Hakone Railway system to get up to Hakone as it is not a JR operated line. You can find out more on the Hakone free pass online.