Hydrogen, as a resource is widely used in refineries in hydrocracking and hydrotreating processes. As hydrogen demand in the refineries is increasing, hydrogen management strategies are of great interest to the refineries. Hydrogen management deals with the optimal distribution or allocation of hydrogen gas within a refinery linking the hydrogen internal sources, and external sources to demand units. Generally, it comprises multiple zones of demands with a dedicated resource for each zone and sources shared by all zones i.e. segregated targeting. The flow is supplied for satisfying the demand via compression. The compression procedures involve huge amounts of investment and also the compression energy. So energy management and investment management in hydrogen allocation networks (HANs) is a very important aspect. To reduce investment and save energy for the petrochemical industry, the hydrogen system in a refinery should be operated under the optimal scheme to meet the varying hydrogen demands of hydrogen consumers. In this paper, a mathematical formulation based on the Pinch Analysis approach is presented to address such problems. The applicability of the proposed methodology is explained via an illustrated example which helps to optimize HAN with multiple zones. The result shows that there is an almost 18% decrease in resource requirement while almost the same energy is utilized. When the next highest CBN is added then there 10% decrease in resource requirement but at the same time a slight increase in energy requirement. It can be concluded from the example that the result allows the decision-maker to utilize in such a way that the common resources can minimize the compression energy in all the zones while satisfying the demand.