The use of natural fungicides instead of synthetic ones covers is a present trend in mycological disease control. The quality and food safeties could be preserved by the addition of natural antifungal agents as essential oils. The aim of the present study was to assess the antifungal activity of certain essential oil against the genus of Aspergillus The oil of the aerial parts of Rosemary plant that collected from Sulaimani city was analyzed by using gas chromatography mass spectrometry. The antifungal activity of Rosemary plant extract against Aspergillus niger was assessed by using agar dilution method. The results showed identification of 17 compounds, with 80.62% of Benzene, 1-methoxy-4- (1-propenyl), 6.85% 1,3,6-Octatriene, 3,7-dimethyl-, (E), 5.16% 1,3,6-Octatriene, 3,7- dimethyl and 2.83% D-Limonene constitute the highest percentage of essential oil. The result of investigation the antifungal effect of Rosemary plant extraction dilutions showed that the essential oil has significant inhibitory effect on growth of Aspergillus niger in 10 %, 12%, 14%, 16%, 18%, 20%, 22%, 24%, 26%, and 28% dilutions with the average inhibitory growth percentage 25.91%, 25.60%, 28.96%, 28.96%, 30.18%, 32.31%, 28.04%, 28.65%, 31.40% and 31.70% respectively. Large percentage antifungal activities of Rosemary oil are related with Benzene, 1-methoxy-4-(1-propenyl) as the main compound. In conclusion, the essential oils exhibited a potential inhibition activity against toxic fungi and many invitro and invivo studies are requested to find more about the antifungal activity of these extracted oils.