In this work a system has been developed to improve the safety of level crossings. These facilities are located on railways without supervision, in most cases, and they are a source of accidents and deaths every year. The safety system works in two ways in real time.On the one hand, the position of a vehicle on the level crossing is identified, taking into account the vehicle location and the level crossing. If a user declares that the vehicle is immobilized, by pressing a button in the app on board, this sends the location and incident event to the central server, and an alert message, through different channels, is sent to the infrastructure manager.Furthermore, it can alert vehicles approaching a level crossing indicating the distance that is, through text, icons and audio. The vehicle location is computed with a frequency depending on its speed.The system exploits the Comobity system, developed for the Traffic Department (Dirección General de Tráfico, DGT). It consists of an app for Android and iOS devices, which communicates in real time with the central platformThe result is a system that improves the protection of intercepting vehicles left the road in the level crossing for breakdowns, plus improved information to vehicles approaching such facilities. The system can reduce material costs as much in human lives due to such accidents