  We give a simple set of geometric conditions on curves $\eta$, $\tilde{\eta}$
in ${\mathbf H}$ from $0$ to $\infty$ so that if $\varphi \colon {\mathbf H}
\to {\mathbf H}$ is a homeomorphism which is conformal off $\eta$ with
$\varphi(\eta) = \tilde{\eta}$ then $\varphi$ is a conformal automorphism of
${\mathbf H}$. Our motivation comes from the fact that it is possible to apply
our result to random conformal welding problems related to the Schramm-Loewner
evolution (SLE) and Liouville quantum gravity (LQG). In particular, we show
that if $\eta$ is a non-space-filling SLE$_\kappa$ curve in ${\mathbf H}$ from
$0$ to $\infty$ and $\varphi$ is a homeomorphism which is conformal on
${\mathbf H} \setminus \eta$ and $\varphi(\eta)$, $\eta$ are equal in
distribution then $\varphi$ is a conformal automorphism of ${\mathbf H}$.
Applying this result for $\kappa=4$ establishes that the welding operation for
critical ($\gamma=2$) Liouville quantum gravity (LQG) is well-defined. Applying
it for $\kappa \in (4,8)$ gives a new proof that the welding of two independent
$\kappa/4$-stable looptrees of quantum disks to produce an SLE$_\kappa$ on top
of an independent $4/\sqrt{\kappa}$-LQG surface is well-defined.
