Using a nonperturbative functional renormalization-group approach to the two-dimensional quantum O(N ) model, we compute the low-frequency limit ω → 0 of the zero-temperature conductivity in the vicinity of the quantum critical point. Our results are obtained from a derivative expansion to second order of a scale-dependent effective action in the presence of an external (i.e., non-dynamical) non-Abelian gauge field. While in the disordered phase the conductivity tensor σ(ω) is diagonal, in the ordered phase it is defined, when N ≥ 3, by two independent elements, σ A (ω) and σ B (ω), respectively associated to SO(N ) rotations which do and do not change the direction of the order parameter. For N = 2, the conductivity in the ordered phase reduces to a single component σ A (ω). We show that limω→0 σ(ω, δ)σ A (ω, −δ)/σ 2 q is a universal number which we compute as a function of N (δ measures the distance to the quantum critical point, q is the charge and σq = q 2 /h the quantum of conductance). On the other hand we argue that the ratio σ B (ω → 0)/σq is universal in the whole ordered phase, independent of N and, when N → ∞, equal to the universal conductivity σ * /σq at the quantum critical point.