"I am feeling very well, I feel no pain in my back or anywhere else," he told reporters as he was driven out of Madrid's La Milagrosa hospital.
He underwent surgery on March 3rd to fix slipped discs and a lumbar spinal stenosis, a condition in which the spinal canal narrows, causing back pain. He now faces several months of rehabilitation.
Juan Carlos is widely respected for his role in steering Spain to democracy after the death of the dictator General Francisco Franco in 1975.
But over the past two years he has suffered health problems as well as rare scandals, including a corruption investigation targeting his son-in-law.
Juan Carlos has appeared on crutches over recent months after having both hips replaced in three operations last year.
The first of those came after he fell during an elephant-hunting holiday in Botswana.
Sympathy for his injury was overshadowed by popular anger over the luxury hunting trip, taken while Spaniards suffered in a deep recession.
The king had a benign tumour removed from a lung in May 2010. Then in 2011 he was given an artificial right knee and had a torn Achilles tendon repaired.
Despite his operations and opinion polls showing his popularity plunged last year, the king insisted in a televised interview last month that he had "energy and hope" to carry on his rule.