Self-organized permalloy nanowire arrays embedded in hexagonally ordered nanochannels of anodic alumina membranes were produced by electrodeposition. The dimensions of the nanowires were tuned over a wide range by controlling the dimensions of the host alumina templates. Room temperature magnetic hysteresis revealed a considerable dependence of the magnetic anisotropy of the array on the nanowire dimensions. The magnetization direction of the nanowires was found to change from axial to longitudinal direction as both the diameter and length of the wire increased. The observed behavior was ascribed to the increase in magnetostatic coupling among nanowires, as confirmed by first-order reversal curve measurements. Theoretical calculations based on a simple magnetostatic model, which considers the dipolar interaction among the wires, estimated the critical dimensions of the nanowires at which the magnetic anisotropy changes from perpendicular to longitudinal direction.