We consider the total curvature of graphs of curves in high-codimension Euclidean space. We introduce the corresponding relaxed energy functional and prove an explicit representation formula. In the case of continuous Cartesian curves, i.e. of graphs cu of continuous functions u on an interval, we show that the relaxed energy is finite if and only if the curve cu has bounded variation and finite total curvature. In this case, moreover, the total curvature does not depend on the Cantor part of the derivative of u. We treat the wider class of graphs of one-dimensional functions of bounded variation, and we prove that the relaxed energy is given by the sum of the length and total curvature of the new curve obtained by closing the holes in cu generated by jumps of u with vertical segments.