AbstractChaos, namely exponential sensitivity to initial conditions, is generally considered a nuisance, inasmuch as it prevents long‐term predictions in physical systems. Here, an easily accessible approach to undo deterministic chaos and tailor ray trajectories in arbitrary 2D optical billiards by introducing spatially varying refractive index therein is presented. A new refractive index landscape is obtained by a conformal mapping, which makes the trajectories of the chaotic billiard fully predictable and the billiard fully integrable. Moreover, trajectory rectification can be pushed a step further by relating chaotic billiards with non‐Euclidean geometries. Two examples are illustrated by projecting billiards built on a sphere as well as the deformed spacetime outside a Schwarzschild black hole, which respectively lead to all periodic orbits and spiraling trajectories remaining away from the boundaries of the transformed 2D billiards/cavities. An implementation of this method is proposed, which enables real‐time control of chaos and can further contribute to a wealth of potential applications in the domain of optical microcavities.