Oxygen was electrochemically intercalated into Sr$_2$IrO$_4$ sintered samples, single crystals and a thin film. We estimate the diffusion length to a few $mu$m and the concentration of the intercalated oxygen to $delta$ $simeq$ 0.01. The latter is thus much smaller than for the cuprate and nickelate parent compounds, for which $delta$ $>$ 0.1 is obtained, which could be a consequence of larger steric effects. The influence of the oxygen doping state on resistivity is small, indicating also a poor charge transfer to the conduction band. It is shown that electrochemical intercalation of oxygen may also contribute to doping, when gating thin films with ionic liquid in the presence of water.