Inverting Polygons using QGIS?
You can do this using the following steps:
1- In QGIS go to Vector > Research Tools > Polygon From Layer Extent
. Use the World's Land area as Input File. Choose the Desired name for the output file name of extent layer. This will create a new vector layer covering the Whole Land area.
2- Use Geoprocessing Tools > Difference
: Use the extent layer created in step one as input file and world's land area as difference file. Then You will get an opposite shapefile which represents the ocean.
When you invert the polygons its probably missing a small amount of ocean in the end as the extend of the landmass will not go up to the northpole and therefore the difference may lack a bit there. Depending on what should be done with the data afterwards it might be better to just get the ocean data.
http://www.naturalearthdata.com/features/
Additional to ahmadhanb answer, you can create a buffer of a few degrees/km/miles to the "Polygon from Layer Extent", in this fashion you will have some space out of the most external vertices of your continental shapes (which is what you obtain).
Then, you may apply "Difference" to this buffered shape to erase you continent polygons and obtain the ocean.