A systematic approach has been presented to retrofit design of hydrogen distribution network. The hydrogen production of utilities and hydrogen consumption of resources have been reduced. The hydrogen network operation has been improved by the optimal solution of the flexibility index model. The total annual cost of the refinery hydrogen network has been reduced.