ABSTRACT. David Hilbert's early foundational views, especially those corresponding to the 1890s, are analysed here. I consider strong evidence for the fact that Hilbert was a logicist at that time, following upon Dedekind's footsteps in his understanding of pure mathematics. This insight makes it possible to throw new light on the shape and evolution of Hilbert's foundational ideas, including his early contributions to the foundations of geometry and the real number system. Most interestingly, the context of Dedekind-style logicism makes it possible to offer a new analysis of the emergence of Hilbert's famous ideas on mathematical existence. And a careful scrutiny of his published and unpublished work around the turn of the century uncovers deep differences between his ideas about consistency proofs before and after 1904. Along the way, we cover topics such as the role of sets (and of the dichotomic conception of set theory) in Hilbert's early axiomatics, and detailed analyses of Hilbert's paradox and of his completeness axiom (Vollständigkeitsaxiom).It is well known that in the address 'Axiomatisches Denken' (1918) Hilbert expressed great interest in the work of Frege and Russell, praising their "magnificent enterprise" of the axiomatization of logic, and saluting its "completion … as the crowning achievement of the work of axiomatization as a whole" 1 (1918, 1113). His high praise not only aimed at formal logic, but more particularly at logicism, as the remarkable statement that anteceded the above phrases made clear: