We present a method for computing the probability density function (PDF) and the cumulative distribution function (CDF) of a nonnegative infinitely divisible random variable X. Our method uses the Lévy-Khintchine representation of the Laplace transform Ee-λX = e-ϕ(λ), where ϕ is the Laplace exponent. We apply the Post-Widder method for Laplace transform inversion combined with a sequence convergence accelerator to obtain accurate results. We demonstrate this technique on several examples, including the stable distribution, mixtures thereof, and integrals with respect to nonnegative Lévy processes.