Using nanoscale electrical-discharge-induced rapid Joule heating, we developed a method for ultrafast shape change and joining of small-volume materials. Shape change is dominated by surface-tension-driven convection in the transient liquid melt, giving an extremely high strain rate of N106 s-1. In addition, the heat can be dissipated in small volumes within a few microseconds through thermal conduction, quenching the melt back to the solid state with cooling rates up to 108 K.s-1. We demonstrate that this approach can be utilized for the ultrafast welding of small-volume crystalline Mo (a refractory metal) and amorphous Cu49Zr51 without introducing obvious microstructural changes, distinguishing the process from bulk welding.