This work aimed to investigate combustion mode conversions by rapid variation of the fuel flow rate in a cavity-based scramjet combustor. The experiments were carried out on a direct-connected facility with an inflow condition of Mach number 2.52, a total pressure of 1.35 MPa, and a total temperature of 1650 K. The fuel injector consisted of two injection ports: fuel was continuously injected from one port while the other controlled the fuel flow for mode conversions by switching it on or off. Simultaneous schlieren and CH* imaging techniques were used to characterize the dynamics of combustion mode conversions. It was recognized that the combustion modes characterized by different flow field structures and heat release distributions can be classified into three types: the shear-layer mode, the transition mode, and the jet-wake mode. During the combustion mode conversion, the mixing region of the transverse jet and air became thicker with the increase in fuel flow rate, and the gradient of the flow field density and the flame area increased, making the flame more likely to propagate upstream. The combustion suppression induced by rapid fuel addition was observed at low equivalence ratios. It was speculated that the weak heat supply was insufficient to provide adequate heat for the rapid ignition of the added fuel. Furthermore, it was found that the flame-flow matching process with frequent flame propagation upstream occurred during the combustion mode conversion. This process was attributed to the mismatch between the increasing heat release and the original flow field structure.