We present a Karhunen-Loeve type expansion for solutions of continuous stochastic differential equations. In particular, this expansion provides a method of numerical approximation by truncating the infinite sum. The discussion of the error term is a non-trivial issue and we apply Malliavin calculus to get the error bound.