We present the implementation of tailored trapping potentials for ultracold gases on an atom chip. We realize highly elongated traps with box-like confinement along the long, axial direction combined with conventional harmonic confinement along the two radial directions. The design, fabrication and characterization of the atom chip and the box traps are described. We load ultracold ( 1 µK) clouds of 87Rb in a box trap, and demonstrate Bose-gas focusing as a means to characterize these atomic clouds in arbitrarily shaped potentials. Our results show that box-like axial potentials on atom chips are very promising for studies of one-dimensional quantum gases.