In recent years, the healthcare sector has increasingly relied on technological advancements to enhance patient care and streamline medical processes. One critical aspect of this technological evolution is the automated identification of Protected Health Information (PHI) within clinical texts. Ensuring patient privacy and compliance with healthcare regulations are paramount concerns in this era of digital healthcare. This thesis delves into the evaluation and com- parison of two Natural Language Processing (NLP) models, ScandiBERT and SweDeClin-BERT, for their effectiveness in automatically detecting PHI within Swedish clinical texts. By leveraging real electronic patient records, this study aims to address the knowledge gap surrounding the optimal approach for au- tomating clinical coding processes in the Swedish healthcare context. Through rigorous evaluation metrics such as precision, recall, F1-score, and computa- tion time, the performance of these models is analyzed across various clinical contexts. The results show that both models exhibit strong performance in identifying PHI. SweDeClin-BERT demonstrates slightly higher precision in certain categories, while ScandiBERT excels in recall for others. Notably, there was not a statistically significant di↵erence between the performance of the two models suggesting that both ScandiBERT and SweDeClin-BERT offer comparable capabilities in identifying PHI within Swedish clinical texts.