Dittrichia viscosa, a perennial herb belonging to the Asteraceae family, was collected in a coastal site located in northern Morocco. This study focused on exploring the phytochemical composition and biological activities of essential oils (EOs) and solvents (methanol and acetone) extract of leaves, stems, and flowers. Total phenolic (TPC) and total flavonoid (TFC) contents were determined, and the result showed a high level of TPC and TFC in leaves with the values of 127.61 mg GAEs/g and 117.82 mg CEs/g, respectively. HPLC-MS analysis highlighted 18 phenolic acids and flavonoids, with notable quantities of apigenin 7-glucoside (2233 μg/g) and chlorogenic acid (1429 μg/g). GC‒MS analysis of EOs allowed the identification of 27 biologically active compounds, dominated by decanoic acid (20.98%) and toluene (19.66%). Regarding the biological activities, antioxidant activity was evaluated through the DPPH test, while antifungal activity was tested using the microdilution method. The most potent antioxidant effect was observed in the methanol extract of leaves, with a value of 0.18 mg/mL, while the weakest effect was noted in the acetone extract of flowers, registering a value of 1.63 mg/mL. Similarly, the antioxidant activity of methanolic extracts surpassed that of acetonic extracts in each part of D. viscosa. Concerning antifungal activity, the findings reveal that all extracts demonstrated important capacity against the tested pathogens. The methanolic extract displayed high efficacy compared to the acetonic one, with MFC values ranging between 1.94-3.38 mg/mL and 2.88-4.75 for Candida albicans, Aspergillus niger and Trichophyton rubrum, respectively. However, for Fusarium oxysporum f. sp. albedinis, the MFCs were higher (7.5-8.5 mg/mL). Regarding EOs, the MFCs were more favorable for the three human pathogenic fungi, ranging between 1.88 and 3.35 µL/mL, compared to F. oxysporum, which has an MFCs of 3.5 µL/mL. In summary, the findings demonstrated that D. viscosa could be considered a useful alternative and reliable source of bioactive compounds for the pharmaceutical and agricultural industries.