A techno-economic analysis was conducted for a 100% renewable energy-based standalone microgrid system comprising of solar PV, battery energy storage and Power to Hydrogen(P2H) system (comprised of Electrolyzer, Fuel Cell and Hydrogen Storage Tank). Hydrogen is gaining widespread interest globally as an energy carrier as well as a storage medium. This study evaluates the potential of hydrogen systems to utilize (in fuel cells) and store (in the form of compressed hydrogen) excess renewable electricity generated which otherwise would be curtailed.Four scenarios (including a diesel generator only base-case scenario) were investigated for a 25 year project lifetime period to select the most optimal set of energy technologies to meet load requirements of a microgrid in San Diego, CA. The microgrid had an electrical load of around 2900 kWh/day and peak annual load of 312 kW. The microgrid design optimization tool HOMER Pro was used to design, model, and simulate the energy technologies and to analyze and compare the energy balance, economics, and environmental emissions amongst the proposed scenarios. A sensitivity analysis was performed to evaluate design robustness against the uncertainty pertaining to fuel cell and electrolyzer costs. The simulation results showed that a hydrogen-battery based renewable hybrid energy storage system minimized total net present cost, and levelized cost of energy technologies. The proposed hybrid energy system has the potential to be deployed to a 100% renewable energy based standalone microgrid system, with low energy generation costs and facilitating in decarbonization efforts.