We consider quasiconformal mappings and densities in metric spaces and give a characterization of quasiconformal mappings in terms of the uniform density property introduced by Gehring and Kelly. In Euclidean spaces, the equivalence can be shown without the extra assumption of absolute continuity, but in metric spaces, the question on absolute continuity is more delicate.