Quantum confinement of graphene Dirac-like electrons in artificially crafted nanometer structures is a long sought goal that would provide a strategy to selectively tune the electronic properties of graphene, including bandgap opening or quantization of energy levels However, creating confining structures with nanometer precision in shape, size and location, remains as an experimental challenge, both for top-down and bottom-up approaches. Moreover, Klein tunneling, offering an escape route to graphene electrons, limits the efficiency of electrostatic confinement. Here, a scanning tunneling microscope (STM) is used to create graphene nanopatterns, with sub-nanometer precision, by the collective manipulation of a large number of H atoms. Individual graphene nanostructures are built at selected locations, with predetermined orientations and shapes, and with dimensions going all the way from 2 nanometers up to 1 micron. The method permits to erase and rebuild the patterns at will, and it can be implemented on different graphene substrates. STM experiments demonstrate that such graphene nanostructures confine very efficiently graphene Dirac quasiparticles, both in zero and one dimensional structures. In graphene quantum dots, perfectly defined energy band gaps up to 0.8 eV are found, that scale as the inverse of the dots linear dimension, as expected for massless Dirac fermions