We associate a C * -algebra to a locally compact Hausdorff groupoid with the property that the range map is locally injective. The construction generalizes J. Renault’s reduced groupoid C * -algebra of an étale groupoid and has the advantage that it works for the groupoid arising from a locally injective dynamical system by the method introduced in increasing generality by Renault, Deaconu and Anantharaman-Delaroche. We study the C * -algebras of such groupoids and give necessary and sufficient conditions for simplicity, and show that many of them contain a Cartan subalgebra as defined by Renault. In particular, this holds when the dynamical system is a shift space, in which case the C * -algebra coincides with the one introduced by Matsumoto and Carlsen.