Hydrogen electrloyzers are power-to-gas storage devices that can facilitate large-scale integration of intermittent renewable sources into the future power systems. Due to their fast response and capability to operate in different loading conditions, they can be used as responsive loads providing support to AC grid during transients. This paper suggests taking one step further and using hydrogen electrolyzers to provide grid-forming services to the grid. As a result, the electrolyzer's role is elevated from supporting the grid (responsive load) to actively participating in forming voltage and frequency of the grid. The grid-forming capability of electrolyzer is linked to its hydrogen production constraints, which can potentially pose limitations on the gridforming services. Besides the grid-forming mode, two additional operating modes, i.e., DC voltage mode and constant power mode, are proposed to ensure a safe operation of the electrolyzer in case of adversary interaction between grid-forming operation and hydrogen production constraints. This paper also studies the impacts of grid-forming services on the electrolyzer's physical features such as hydrogen stack temperature and efficiency. Comprehensive simulations are conducted on a low-inertia test network whose topology is inspired by a portion of the transmission grid in South Australia to confirm the effectiveness of the proposed concept under various operational conditions of the electrolyzer and upstream AC grid. Moreover, the practical feasibility of the proposed control system is experimentally validated by conducting hardware-in-the-loop tests.