Gauss–Legendre quadrature, Clenshaw–Curtis quadrature and the trapezoid rule are powerful tools for numerical integration of analytic functions. For nearly singular problems, however, these standard methods become unacceptably slow. We discuss and generalize some existing methods for improving on these schemes when the location of the nearby singularity is known. We conclude with an application to some nearly singular surface integrals that arise in three-dimensional viscous fluid flow.