Purpose This paper aims to investigate the sealing characteristic of the rubber X-ring combined seal used in high-pressure hydrogen service and clarify the effect of swelling due to dissolved hydrogen on the sealing behavior. Design/methodology/approach A finite element analysis method with a user subroutine is proposed to investigate the sealing characteristic of rubber X-ring seals in conjunction with the swelling effect. Findings The swelling has a noticeable impact on the sealing behavior. The higher peak contact stress suggests that the X-ring seal may be superior to the O-ring seal, while the calculated increase in Mises stress suggests the X-ring exhibits a higher propensity to mechanical damage under low pressure conditions. Originality/value This paper describes a method with a user subroutine developed within ABAQUS to simulate the sealing performance coupled hydrogen swelling. The suitability of X-ring seals is evaluated. This work provides insight into the swelling effect on sealing behavior of an X-ring, which is of great value for the design and application of rubber seals used in hydrogen service.