The high energy spectrum of 3C 273 is usually understood in terms of inverse-Compton emission in a relativistic leptonic jet. This model predicts variability patterns and delays that could be tested with simultaneous observations from the radio to the GeV range. The instruments IBIS, SPI, JEM-X on board INTEGRAL, PCA on board RXTE, and LAT on board Fermi have enough sensitivity to follow the spectral variability of 3C 273 from the keV to the GeV. We looked for correlations between the different energy bands, including radio data at 37 GHz collected at the Metsähovi Radio Observatory and built quasi-simultaneous multiwavelength spectra in the high energy domain when the source is flaring either in the X-rays or in the γ rays. Both temporal and spectral analysis suggest a two-component model to explain the complete high energy spectrum. X-ray emission is likely dominated by a Seyfert-like component while the γ-ray emission is dominated by a blazar-like component produced by the relativistic jet. The variability of the blazar-like component is discussed, comparing the spectral parameters in the two different spectral states. Changes of the electron Lorentz factor are found to be the most likely source of the observed variability.