ABSTRACT Machine learning based approaches are emerging as very powerful tools for many applications including source classification in astrophysics research due to the availability of huge high quality data from different surveys in observational astronomy. The Large Area Telescope on board Fermi satellite (Fermi-LAT) has discovered more than 6500 high energy gamma-ray sources in the sky from its survey over a decade. A significant fraction of sources observed by the Fermi-LAT either remains unassociated or has been identified as Blazar Candidates of Uncertain type (BCUs). We explore the potential of eXtreme Gradient Boosting – a supervised machine learning algorithm to identify the blazar subclasses among a sample of 112 BCUs of the 4FGL catalogue whose X-ray counterparts are available within 95 per cent uncertainty regions of the Fermi-LAT observations. We have used information from the multiwavelength observations in IR, optical, UV, X-ray, and γ-ray wavebands along with the redshift measurements reported in the literature for classification. Among the 112 uncertain type blazars, 62 are classified as BL Lacertae objects and six have been classified as flat spectrum radio quasars. This indicates a significant improvement with respect to the multiperceptron neural network based classification reported in the literature. Our study suggests that the gamma-ray spectral index, and IR colour indices are the most important features for identifying the blazar subclasses using the XGBoost classifier. We also explore the importance of redshift in the classification BCU candidates.