We prove that the SLE loop measure arises naturally from the conformal welding of two Liouville quantum gravity (LQG) disks for γ 2 = κ ∈ (0, 4). The proof relies on our companion work on conformal welding of LQG disks and uses as an essential tool the concept of uniform embedding of LQG surfaces. Combining our result with work of Gwynne and Miller, we get that random quadrangulations decorated by a self-avoiding polygon converge in the scaling limit to the LQG sphere decorated by the SLE 8/3 loop. Our result is also a key input to recent work of the first and third coauthors on the integrability of the conformal loop ensemble. Finally, our result can be viewed as the random counterpart of an action functional identity due to Viklund and Wang.