A police officer needs probable cause to pull you over. Likewise, during a stop, an officer needs probable cause to search your car.
If an officer asks for your permission to search your car, you do not need to agree. In fact, merely asking for your consent may indicate that the officer does not have sufficient probable cause to perform a search without permission. Do not agree to a search for the sake of being cooperative if you are concerned about what an officer may find. Be aware that the officer does not need consent if any of the following conditions are present.
Suspicion of criminal activity
When police officers have reason to believe that a person committed a crime, they may search his or her vehicle to look for evidence. Their search is limited to areas of the vehicle which they believe could contain evidence.
Plain view
Seeing any type of weapon or contraband in plain view will establish probable cause for a search. An officer may look in every part of your car, including your trunk.
Odor
The smell of drugs or alcohol coming from a car will create grounds for a search. Although the perception of an odor may be subjective, the officer does not need your consent in this type of situation.
Arrest
If an officer arrests you for any type of offense, he or she may search your car for any evidence related to the crime. When police impound a car after an arrest, they will likely search the entire vehicle.