Piezo-actuated x-ray deformable mirrors (PXDMs) can effectively control the surface profile with sub-nanometre accuracy for adaptive focusing and correct the wavefront distortion generated due to imperfections in optical components or other extraneous effects like heat load, minor misalignments of synchrotron radiation beamline. Generating and controlling the desired shape of PXDMs with sub-nanometre accuracy is very challenging due to the presence of a large number of actuators and constraints related to nonlinearity of piezoactuator, boundary conditions, fabrication related limitations and the requirement for ex-situ as well as in-situ characterization of PXDM. To accomplish this, a PXDM of zerodur with multiple electrodes on a piezoactuator has been developed for vertical focusing of synchrotron x-rays for the first time in India. The PXDM has been fabricated and characterized by in-house developed technologies. The iterative piezo response function-based optimization technique is used to optimize the electric fields of individual piezoactuators in order to achieve the desired parabolic shape of the PXDM. The ex-situ characterization showed that the PXDM can achieve the target parabolic profile with 42 nm root-mean-square error. Furthermore, in-situ characterization at a beamline, BL-12, of Indus-2 synchrotron radiation source using PXDM has confirmed the focusing of collimated x-ray beam in the vertical direction from FWHM 235 μm to FWHM 83 μm.