For the existing encoder-noise-decoder (END) based watermarking models, since the coupling between the encoder and the decoder is weak, the encoder generally embeds certain redundant features into the cover image to enable the decoder to extract watermark completely, which will affect watermarking invisibility. To address this problem, this paper proposes a Transformer-based invertible neural network (INN) for robust image watermarking (IWFormer). In order to effectively reduce redundant features, the INN framework is utilized for the watermark embedding and extracting processes, so that the encoded features are highly consistent with the features required for decoding. For enhancing watermarking robustness, an affine Transformer module is designed by mining the global correlation of the cover image. In addition, considering that the human visual system is sensitive to low-frequency variations, the wavelet low-frequency sub-band loss is deployed to guide watermark to be embedded in middle- and high-frequency components, thus further increasing the quality of the encoded images. Experimental results demonstrate that compared with the existing state-of-the-art watermarking models, the proposed IWFormer owns remarkable advantages in terms of both watermarking invisibility and robustness.