Hardy set a number of world records on her return to competition in 2009
Jessica Hardy has been cleared to continue swimming after the World Anti-Doping Agency (Wada) lost an appeal to double her ban from one to two years.
The Court of Arbitration for Sport (Cas) found that Hardy had "shown good faith" in taking supplements that later were found to contain a banned steroid.
The American was suspended for one year and missed the Beijing Olympics in 2008 after a positive test at the US trials.
On her return last year, Hardy, 23, set several breaststroke world records.
In her first competition, the United States National Championships in August 2009, she became the first woman to break 30 seconds in the 50m long course event, recaptured the 100m long course record and lowered the standard in the 50m short course four times.
And the Cas ruling means she is allowed to keep her records.
"I am extremely happy to put this case behind me, and to start looking forward," Hardy said in a statement.
Her feats came just over one year after testing positive for the banned steroid Clenbuterol at the 2008 US Olympic trials - a result which normally carries a two-year ban.
However, the American Arbitration Association (AAA) imposed a reduced 12-month ban when Hardy explained she took nutritional supplements after having obtained assurances from the manufacturer.
Wada wanted the ban increasing to two years, but Cas ruled that the AAA penalty was enough.
A Cas statement read: "Jessica Hardy had shown good faith efforts before ingesting the food supplements at stake.
"The athlete had personal conversations with the manufacturer about the supplements' purity prior to taking them, she obtained the supplements directly from the manufacturer, not from an unknown source; supplements she took were not labelled in a manner which might have raised suspicions."
Hardy, who voluntarily withdrew from the American Olympic team competing in Beijing, is still unsure as to whether she will be allowed to compete in London in 2012.
The International Olympic Committee (IOC) has introduced a ruling which bars athletes from the next Games if they have been banned for doping for six months.
Cas declined to make any recommendation on whether the IOC, who brought in the ruling three days before Hardy provided the sample that led to the failed test, should allow her to compete at the 2012 Games.