Nanoscale carbides enhance ultra-strong ceramics and show activity as high-performance catalysts. Traditional lengthy carburization methods for carbide syntheses usually result in coked surface, large particle size, and uncontrolled phase. Here, a flash Joule heating process is developed for ultrafast synthesis of carbide nanocrystals within 1 s. Various interstitial transition metal carbides (TiC, ZrC, HfC, VC, NbC, TaC, Cr<
sub>
2<
/sub>
C<
sub>
3<
/sub>
, MoC, and W<
sub>
2<
/sub>
C) and covalent carbides (B<
sub>
4<
/sub>
C and SiC) are produced using low-cost precursors. By controlling pulse voltages, phase-pure molybdenum carbides including ?-Mo<
sub>
2<
/sub>
C and metastable ?-MoC<
sub>
1-x<
/sub>
and ?-MoC<
sub>
1-x<
/sub>
are selectively synthesized, demonstrating the excellent phase engineering ability of the flash Joule heating by broadly tunable energy input that can exceed 3000 K coupled with kinetically controlled ultrafast cooling (>
10<
sup>
4<
/sup>
K s<
sup>
?1<
/sup>
). Theoretical calculation reveals carbon vacancies as the driving factor for topotactic transition of carbide phases. The phase-dependent hydrogen evolution capability of molybdenum carbides is investigated with ?-Mo<
sub>
2<
/sub>
C showing the best performance.