Aims. We report new VLBA polarimetric observations of the compact steep-spectrum (CSS) quasar 3C 147 (B0538 + 498) at 5 and 8.4 GHz. Methods. By using multifrequency VLBA observations, we derived milliarcsecond-resolution images of the total intensity, polarisation, and rotation measure distributions, by combining our new observations with archival data. Results. The source shows a one-sided structure, with a compact region, and a component extending about 200 mas to the south-west. The compact region is resolved into two main components with polarised emission, a complex rotation measure distribution, and a magnetic field dominated by components perpendicular to the source axis. Conclusions. By considering all the available data, we examine the possible location of the core component, and discuss two possible interpretations of the observed structure of this source: core-jet and lobe-hot spot. Further observations to unambiguously determine the location of the core would help distinguish between the two possibilities discussed here.