Quantum superintegrable systems in two dimensions are obtained from their classical counterparts, the quantum integrals of motion being obtained from the corresponding classical integrals by a symmetrization procedure. For each quantum superintegrable system a deformed oscillator algebra, characterized by a structure function specific for each system, is constructed, the generators of the algebra being functions of the quantum integrals of motion. The energy eigenvalues corresponding to a state with finite-dimensional degeneracy can then be obtained in an economical way from solving a system of two equations satisfied by the structure function, the results being in agreement to the ones obtained from the solution of the relevant Schrödinger equation. Applications to the harmonic oscillator in a flat space and in a curved space with constant curvature, the Kepler problem in a flat or curved space, the Fokas-Lagerstrom potential, the Smorodinsky-Winternitz potential, and the Holt potential are given. The method shows how quantum-algebraic techniques can simplify the study of quantum superintegrable systems, especially in higher dimensions. © 1994 The American Physical Society.