Katt Williams has dodged jail time almost as well as he dodged cops ... TMZ has learned, the comic has narrowly escaped the slammer in his Sacramento police chase case.
Katt was in court today, where he pled down to misdemeanor evading police ... stemming from the wild three-wheeled chase he led cops on last November.
Katt had originally been charged with felony evading police ... but prosecutors agreed to reduce the charge. As part of the deal, Katt was sentenced to 428 hours of community service to be completed in 9 months -- but no jail.
Katt's attorney Richard Schonfeld tells us, "Mr. Williams looks forward to working with the community and moving on with his life."