You’ve been arrested. Even if you get off with probation, a criminal conviction could haunt you in ways you might not imagine. It could get you evicted from your home or prevent you from volunteering at your child’s school.

But there is another option that can keep your record clean: pretrial diversion.

You’ll probably have to pay a fee, take classes or undergo counseling, perform community service and submit to supervision. Do all that, and your case will be dismissed. But you may also have to make concessions, like giving up your right to a trial by jury if things go wrong.

Below you will be faced with real choices, costs and conditions drawn from a New York Times investigation of diversion programs across the country.