×

Drive badly? It'll cost you more in some states

Police and driver
Hill Street Studios | Getty Images

If you own a car, getting pulled over is going to cost you.

Most car owners typically get a break on auto insurance rates if they maintain a good driving record. But for bad drivers stopped with moving violations, the higher premium in many states could be much more costly than the fine you'll pay for the traffic ticket, according to an analysis by InsuranceQuotes.com.

Speeding in Illinois will, on average, double your premiums. A North Carolina resident hit with a DUI violation can expect to see their rates go up by an average 337 percent—nearly four times the national average. And take it easy in Hawaii. If you're pulled over for reckless driving, you're looking at an average premium bump of 287 percent—more than triple the national average.

Read MoreThe real cost of an auto insurance claim

Overall, drunk driving comes with the biggest rate increases—up 92 percent nationwide, with reckless driving (83 percent) a close second. Speeding more than 30 mph over the limit will boost your rates by 29 percent. Less costly violations include not wearing a seatbelt (6 percent), driving without a license (16 percent) and violating railroad rules (18 percent).

You can also try to have the violation removed or reduced. For some violations, certain states will let you off the hook if you take a driver safety course —but only for a limited number of offenses. If the violation is serious enough, and the premium increase big enough, it may also be worth it to find a lawyer to try to help you reduce the violation to a lesser charge.

And if you're stuck with a higher premium, you may also consider cutting back on some lines of coverage—like raising the deductibles for collision or comprehensive coverage that includes things like broken windshields.

The survey is based on data from the largest auto insurance carriers representing 60 to 70 percent of the market in each state.

Eventually, the moving violation will drop off your record but—depending on your state's laws—it could take years.

Read More Switch insurers after hack attack? Unlikely, analysts say

"Typically your driving history is going to stick with you from anywhere to three to five years," said Laura Adams, senior analyst at InsuranceQuotes.com. "For a DUI, that's going to stick with you much longer, typically for a much as 10 years."

The premium increase varies from one driver to another—these numbers are a 45-year-old married, employed female who has a bachelor's degree, an excellent credit score, no lapses in coverage, who started with a clean driving record and drives a 2012 sedan. (As the saying goes, your mileage may vary.)

Drivers with multiple offenses may see even bigger increases—or have their policy canceled altogether. In any case, a premium increase is a good excuse to shop around. Insurance rates can vary widely from one carrier to another; some may be more willing to give you a break than others.

In the meantime, slow down, fasten your seat belt, put away your cellphone and drive responsibly.

Got a question about business or the economy? Send it to CNBC Explains: explains@cnbc.com