"Jeff and I both believe the future is to be a spacefaring civilization," Musk said at the Code Conference Wednesday night, a day after Bezos took the stage in Rancho Palos Verdes, California.
Musk, the founder and CEO of SpaceX, has built a multi-billion dollar company already sending private aircraft to space on contracts with NASA. Lately, the company has made headlines for landing rockets on a floating drone barge.
Bezos, the CEO of Amazon.com, also has an aerospace company called Blue Origin. He said Tuesday at Code that we need to start building parts of the economy in space to "save Earth."
Musk said we're on the verge of being a multi-planetary species, a future he sees as "exciting and inspiring."
Musk hasn't yet been to space himself, though he said he'll likely go into orbit in four or five years.
"I think I will at some point," he said.
For more coverage of the Code Conference, click here
CNBC's parent NBCUniversal is an investor in Recode's parent Vox, and the companies have a content-sharing arrangement.