An online iterative learning contouring control (online ILCC) method is proposed to improve the contouring performance of multi-axis motion systems by simultaneously reducing position and orientation contour errors. Unlike the conventional ILCC and iterative learning control (ILC) methods, which are formulated in an offline batch-learning framework (offline ILCC and offline ILC), the proposed online ILCC employs an equivalent contour error formulation and updates the learning command in real time at each sampling instant. Consequently, large-scale matrix operations and high memory requirements inherent in offline learning frameworks are avoided, and the computational burden is significantly reduced, making real-time implementation feasible even for long and multi-segment trajectories. Experimental validation was conducted on a commercial six-axis industrial robot with a sampling time of 1 ms, and the proposed method was compared with an offline ILCC method and a Newton-ILC approach. The experimental results show that the proposed online ILCC guarantees monotonic convergence of both position and orientation contour errors, and achieves contouring performance comparable to that of the offline ILCC, while outperforming the Newton-ILC method. Furthermore, the proposed online ILCC exhibits substantially simplified computation and markedly higher computational efficiency than both the offline ILCC and Newton-ILC methods, demonstrating its effectiveness and practical feasibility for real-time multi-axis contouring applications. Additional validations involving multi-segment trajectories, time-varying payloads, and helical paths further validate its robustness and generality.