We investigate the evolution of light transmitted by a fork-shaped phase grating etched on the core of an optical fiber using a near-field scanning optical microscope. The optical near-field intensity, simulated based on the angular spectrum method of propagation matches well with the experimental measurements. We propose a scheme to estimate the complex optical field within nanometres of the device by applying an iterative phase retrieval algorithm based on the angular spectrum method of propagation. The recorded intensity scans at different heights from the device accurately match with that calculated from the estimated phase carried out using the propagation of the resulting complex field. The proposed method provides a first of its kind insight into the evolution of the intensity and phase characteristics of propagating near-field. © 2018 IOP Publishing Ltd.