We introduce an algebraic version of the Katsura C∗-algebra of a pair A,B of integer matrices and an algebraic version of the Exel–Pardo C∗-algebra of a self-similar action on a graph. We prove a Graded Uniqueness Theorem for such algebras and construct a homomorphism of the latter into a Steinberg algebra that, under mild conditions, is an isomorphism. Working with Steinberg algebras over non-Hausdorff groupoids we prove that in the unital case, our algebraic version of Katsura C∗-algebras are all isomorphic to Steinberg algebras.