This research aims to investigate how to protect workers from discrimination dictated by an algorithm in the contractual conditions. Article 15 of the Italian Workers’ Statute declares invalid any agreement or act aimed at: dismissing a worker, discriminating him in the assignment of qualifications or tasks, transfers, disciplinary measures, or otherwise prejudicing him because of his affiliation or union activity, or his participation in a strike. These provisions shall also apply to pacts or acts for the purposes of political, religious, racial, language, sex, disability, age, sexual orientation, or belief. Our work intends to explore the risk of gender or age discrimination in the contractual terms for platform workers in Italy. How can workers’ protections be preserved when decisions are made by an algorithm? The research is conducted with a multidisciplinary methodology. We first analyze both national and international literature and jurisprudence. Then, by means of probit models on INAPP PLUS 2021 survey data, we analyze contract characteristics, in particular the written form of the contract and the hourly minimum wage. Controlling for individual and job characteristics, we find evidence of discrimination according to gender and age of workers. We conclude with policy recommendations.