We show upper bounds on the maximal dimension d of Hilbert cubes H = a 0 +{0, a 1 }+· · ·+{0, a d } ⊂ S ∩[1, N ] in several sets S of arithmetic interest. a) For the set of squares we obtain d = O(log log N ). Using previously known methods this bound could have been achieved only conditionally subject to an unsolved problem of Erdős and Rado. b) For the set W of powerful numbers we show d = O((log N ) 2 ). c) For the set V of pure powers we also show d = O((log N ) 2 ), but for a homogeneous Hilbert cube, with a 0 = 0, this can be improved to d = O((log log N ) 3 / log log log N ), when the a i are distinct, and d = O((log log N ) 4 /(log log log N ) 2 ), generally. This compares with a result of d = O((log N ) 3 /(log log N ) 1/2 ) in the literature. d) For the set V we also solve an open problem of Hegyvári and Sárközy, namely we show that V does not contain an infinite Hilbert cube. e) For a set without arithmetic progressions of length k we prove d = O k (log N ), which is close to the true order of magnitude.