Nanoparticles are well-suited for developing diagnostic and therapeutic tools due to their small size and favorable physicochemical properties. They provide unique features that many conventional approaches cannot, such as high-resolution imaging utilizing nanosensors, improved bioavailability of nanoformulated therapeutics, and targeted delivery. Polymeric nanoparticles can be easily structurally modified to tailor specific properties, making them suitable for a wide range of applications. Three studies were carried out as part of this thesis, demonstrating the diverse applications of polystyrene nanoparticles as nanosensors for biosensing in biofilms and eukaryotic cells, and as nanocarriers for the treatment of pathogenic biofilms. In the first study, a pH nanosensor based on biocompatible polystyrene nanoparticles was developed to determine and visualize the pH in biofilms. The nanosensor employs a ratiometric principle to determine pH, based on the fluorescence intensity ratio of the pH insensitive dye nile red and the pH-sensitive dye fluorescein isothiocyanate (FITC). The fluorescence is acquired by confocal laser scanning microscopy. This method allows for threedimensional measurement of pH over extended time periods, enabling detailed studies of dynamic processes in biofilms. The study demonstrated the functionality of the pH nanosensor by imaging the time-dependent pH changes induced by the metabolic activity of Escherichia coli biofilms. The nanosensor is easy to use, no special equipment is required, yet the measurements are precise, and the sensor is very robust. This is achieved by the smart design concept with its ratiometric working principle, making it a valuable tool for characterizing the chemical microenvironment of biofilms. The pH nanosensor can improve the understanding of biofilm dynamics and enable the development of improved strategies to combat biofilmassociated health problems in industry and for clinical settings. The second study describes a nanosensor for the determination of extracellular pH and the extracellular pH microenvironment of eukaryotic cells. The nanosensor operates on the same principle as the sensor in the first study, but a significant addition enables the direct measurement of pH at the cell surface. The nanosensor is conjugated to a lectin, which binds to the cell membrane and anchors the nanosensor to the cell surface. This method enables a precise and spatially resolved measurement of extracellular pH at the cell surface of individual cells. The study demonstrates the versatility and compatibility of this pH nanosensor with different cell lines from various organs, combined with effective targeting. It has great potential for studying the cellular microenvironment and gaining a deeper understanding of cellular processes based on these microenvironments. Its applications are found in biomedical research, particularly in cancer research, for understanding and studying metabolic disorders, and for diagnostic or therapeutic purposes. In the third study, a novel tool for the photodynamic eradication of biofilms was developed and applied. Polystyrene nanoparticles were used as carriers to embed the lipophilic photosensitizer (a boron-dipyrromethene derivative) and deliver it to the biofilm for activation at the target site. The study demonstrated that the photosensitizer-loaded nanoparticles were highly effective against planktonic bacteria and bacterial biofilms of pathogenic bacteria such as Escherichia coli, Staphylococcus aureus, and Streptococcus mutans. Furthermore, the study aimed to characterize the interactions between nanoparticles and biofilms to enhance the understanding of the mechanisms behind antimicrobial photodynamic therapy using nanoscale treatment agents against biofilms. The photosensitizer-loaded nanoparticles were found to be a highly effective tool in the prevention and removal of biofilms. They showed even higher efficacy than many tools in previously published studies about antimicrobial photodynamic therapy, both with and without nanoparticles. The nanoparticles presented in this study have great potential to be used as effective tools in the fight against biofilms. They offer a practical and straightforward alternative to existing methods, with a lower risk of bacterial resistance developing in the future. In summary, these studies highlight the potential of polymeric nanoparticles as carriers for effective antimicrobial treatment and as sensors for providing valuable insights into biofilm microenvironments. Furthermore, they enable precise extracellular pH measurements in diverse cell lines. These advancements hold promise for future research and applications in fields ranging from biofilm characterization to biomedical research and antimicrobial therapy.