We search for stable compounds of boron and oxygen at pressures from 0 to 500 GPa using the ab initio evolutionary algorithm USPEX. Only two stable stoichiometries of boron oxides, namely, B 6 O and B 2 O 3 , are found to be stable, in good agreement with experiment. A hitherto unknown phase of B 6 O at ambient pressure, Cmcm-B 6 O, has recently been predicted by us and observed experimentally. For B 2 O 3 , we predict three previously unknown stable high-pressure phases-two of these (Cmc2 1 and P 2 1 2 1 2 1) are dynamically and mechanically stable at ambient pressure, and should be quenchable to ambient conditions. Their predicted hardnesses, reaching 33-35 GPa, make them harder than SiO 2-stishovite. These are the hardest known oxides (if one disregards B 6 O, which is essentially a boron-based insertion compound). Under pressure, the coordination number of boron atoms changes from 3 to 4 to 6, skipping fivefold coordination.