The design of refinery hydrogen networks minimizing the total annualized cost is a computationally hard optimization problem. This is mainly due to the highly nonlinear compression power constraint and the nonconvexities of the problem. To decrease the nonlinearities, we propose in this work a concept of pressure discretization, and therein the pressure variables of new makeup compressors make discrete choices among the specified pressures of hydrogen origin and destination units. Based on this concept, the constraint of compression power is linearized without losing rigors. Then, hydrogen networks design is formulated as a mixed integer nonlinear programming model that is applicable to both grass-roots synthesis and retrofit problems. We develop a global optimization algorithm to solve the proposed model to global optimality. Two grass-roots synthesis and three retrofit examples are tested for illustration purposes. The total annualized cost and computing time of our solutions compare favorably to those of literature solutions.