One of the worst traffic problems today is the existence of huge traffic jams in almost any big city, produced by the large number of commuters using private cars. This problem has led to an increase in research on the optimization of vehicle occupancy in urban areas as this would help to solve the problem that most cars are occupied by single passengers. The solution of sharing the available seats in cars, known as carpooling, is already available in major cities around the world. However, carpooling is still not considered a safe and reliable solution for many users. With the widespread use of mobile technology and social networks, it is possible to create a trust-based platform to promote carpooling through a convenient, fast and secure system. The main objective of this work is the design and implementation of a carpool system that improves some important aspects of previous systems, focusing on trust between users, and on the security of the system. The proposed system guarantees user privacy and measures trust levels through a new reputation algorithm. In addition to this, the proposal has been developed as a mobile application for devices using the Android Open Source Project.