Purpose This study aims to investigate the formation and characteristics of Taylor bubbles resulting from short-time gas injection in liquid-conveying pipelines. Understanding these characteristics is crucial for optimizing pipeline efficiency and enhancing production safety. Design/methodology/approach The authors conducted short-time gas injection experiments in a vertical rectangular pipe, focusing on Taylor bubble formation time and stable length. Computational fluid dynamics simulations using large eddy simulation and volume of fluid models were used to complement the experiments. Findings Results reveal that the stable length of Taylor bubbles is significantly influenced by gas injection velocity and duration. Specifically, high injection velocity and duration lead to increased bubble aggregation and recirculation region capture, extending the stable length. Additionally, a higher injection velocity accelerates reaching the critical local gas volume fraction, thereby reducing formation time. The developed fitting formulas for stable length and formation time show good agreement with experimental data, with average errors of 6.5% and 7.39%, respectively. The predicted values of the formulas in glycerol-water and ethanol solutions are also in good agreement with the simulation results. Originality/value This research provides new insights into Taylor bubble dynamics under short-time gas injection, offering predictive formulas for bubble formation time and stable length. These findings are valuable for optimizing industrial pipeline designs and mitigating potential safety issues.