The use of cannabidiol (CBD) in electronic cigarettes is widespread. Previously, it was reported that CBD is partly transformed to THC in case smoking as a cigarette, however, the pyrolysis of this compound has not been assessed extensively. The aim of our study was to investigate the effect of temperature on the composition of pyrolysis products of CBD. The experiments were performed in the typical operating temperature range of e-cigarettes (250-400 °C) and at 500 °C under both inert and oxidative conditions, and the pyrolysis products were identified and quantified by GC-MS. Depending on the temperature and atmosphere, 25-52% of CBD was transformed into other chemical substances: Δ9-THC, Δ8-THC, cannabinol and cannabichromene were the predominant pyrolysates in both conditions, all formed by cyclization reaction. THC was the main pyrolysis product at all temperatures under both oxidative and inert conditions. Our results point out that CBD in e-cigarettes can be considered as a precursor of THC, thus it bears all the dangers related to this psychoactive compound. Our findings are fundamental contributions to the safety profile of CBD-based e-cigarettes.