In recent years, the exploitation and utilization of offshore oil and gas resources have attracted more attention. In offshore gas reservoir production, wellbore temperature and pressure change continuously when water-bearing natural gas flows upward. The wellbore temperature is also affected by the low-temperature sea water. The combination of temperatures and pressures controlled by the upward flow, and cooling from the surrounding seawater frequently leads to the conditions of temperature and pressure for hydrate formation. This can lead to pipeline blockage and other safety accidents. In this study, we utilize mathematical models of hydrate phase equilibrium, wellbore temperature, wellbore pressure to study hydrate formation and decomposition in offshore gas reservoir production. Numerical solution algorithms are developed and numerical solutions are validated. The sensitivity influence of different parameters on the regions and regularities of hydrate formation and decomposition in wellbores are obtained through numerical simulations. It is found that increased daily gas production, water content, or geothermal gradient in offshore gas reservoir production pipelines results in less hydrate formation in the wellbores. Accordingly, the risk of wellbore blockage decreases and production safety is maintained. Decreased tubing head pressure or seawater depth results in similar effects. The result of this study establishes a set of prediction methods for hydrate formation and decomposition that can be used in the development of guidelines for safe construction design.