We introduce the notion of orbit equivalence of directed graphs, following Matsumoto’s notion of continuous orbit equivalence for topological Markov shifts. We show that two graphs in which every cycle has an exit are orbit equivalent if and only if there is a diagonal-preserving isomorphism between their C∗C∗-algebras. We show that it is necessary to assume that every cycle has an exit for the forward implication, but that the reverse implication holds for arbitrary graphs. As part of our analysis of arbitrary graphs EE we construct a groupoid G(C∗(E),D(E))G(C∗(E),D(E)) from the graph algebra C∗(E)C∗(E) and its diagonal subalgebra D(E)D(E) which generalises Renault’s Weyl groupoid construction applied to (C∗(E),D(E))(C∗(E),D(E)). We show that G(C∗(E),D(E))G(C∗(E),D(E)) recovers the graph groupoid GEGE without the assumption that every cycle in EE has an exit, which is required to apply Renault’s results to (C∗(E),D(E))(C∗(E),D(E)). We finish with applications of our results to out-splittings of graphs and to amplified graphs