It's the second successful technology demonstration on the mission, which flew a mini-helicopter on Monday.
The oxygen generation was performed by a toaster-sized unit in the rover called Moxie - the Mars Oxygen In-Situ Resource Utilization Experiment.
It made 5 grams of the gas - equivalent to what an astronaut at Mars would need to breathe for roughly 10 minutes.
Nasa's thinking is that future human missions would take scaled-up versions of Moxie with them to the Red Planet rather than try to carry from Earth all the oxygen needed to sustain them.
Read more at : https://www.bbc.com/news/science-environment-56844601