Kim and Vu made the following conjecture (Advances in Mathematics, sandwich conjecture, with perfect containment on both sides, for all d ≫ n/ √ log n. For d = O(n/ √ log n), we prove a weaker version of the sandwich conjecture with p 2 approximately equal to (d/n) log n and without any defect. In addition to sandwiching random regular graphs, our results cover random graphs whose degrees are asymptotically equal. The proofs rely on estimates for the probability that a random factor of a pseudorandom graph contains a given edge, which is of independent interest.As applications, we obtain new results on the properties of random graphs with given near-regular degree sequences, including the Hamiltonicity and the universality. We also determine several graph parameters in these random graphs, such as the chromatic number, the small subgraph counts, the diameter, and the independence number. We are also able to characterise many phase transitions in edge percolation on these random graphs, such as the threshold for the appearance of a giant component.