Most of the existing smart parking systems threaten the drivers' privacy by revealing information about their visited locations. Moreover, they are centralized making them vulnerable to a single point of failure and attack, which threatens the availability of the parking service. They also suffer from a lack of transparency, where the centralized service organizer may favor some parking lots by booking their parking slots first. To tackle these concerns, we propose a blockchain-based smart parking system with privacy preservation and reputation management. In our system, a consortium blockchain is created by different parking lots to run the parking system securely and transparently, where the parking offers are recorded on a shared and immutable ledger. We use a commitment technique during the submission of the offers to ensure fair parking rates. Then, we use a private information retrieval technique during the offers retrieval to preserve the drivers' location privacy. Furthermore, to anonymously and efficiently authenticate drivers during the reservation process, we use a short randomizable signature. We also use a time-locked anonymous payment technique to discourage drivers from not committing to their parking reservations and provide a secure and privacy-preserving payment method for parking service. Finally, we integrate a blockchain-based anonymous reputation management scheme into our system, where drivers can anonymously rate the parking service to ensure high quality of service. Our evaluations demonstrate that our smart parking system is secure and capable of preserving drivers' privacy with low communication, computation, and storage overheads.