Wozniacki retires hurt after fall as Badosa is knocked out at Bad Homburg
Danish wildcard Wozniacki was facing third-seeded American Emma Navarro and had taken the opening set in which she fell and seemed to hurt her knee.
The former Australian Open champion was losing 4-6, 6-1, 1-0 when she retired, with one eye on Wimbledon, which starts on Monday, where she also has a wildcard.
Spain's former world number two Badosa, also a wildcard, struggled with double faults and Russian Diana Shnaider's superior second serve in the second set as she lost 6-3, 7-6(3).
Shnaider will face Navarro in the semi-finals.
Croatia's Donna Vekic is also in the last four after receiving a walkover when Czech defending champion Katerina Siniakova pulled out due to a hip injury.
Vekic will face Bulgarian Viktoriya Tomova after she defeated Russia's Anna Blinkova in the last quarter-final.