We show that when two boundary arcs of a Liouville quantum gravity random surface are conformally welded to each other (in a boundary length-preserving way) the resulting interface is a random curve called the Schramm-Loewner evolution. We also develop a theory of quantum fractal measures (consistent with the Knizhnik-Polyakov-Zamolochikov relation) and analyze their evolution under conformal welding maps related to Schramm-Loewner evolution. As an application, we construct quantum length and boundary intersection measures on the Schramm-Loewner evolution curve itself.French National Research Agency (ANR) (Grant No. ANR-08-BLAN-0311-CSD5)Institut national des sciences de l'univers (France) (Grant No. CNRS-PEPS-PTI 2010)National Science Foun...