The present invention relates to a process for the synthesis of 5-hydroxymethyl furfural (HMF) comprising the steps of: 1) dehydrating at least one saccharide selected from monosaccharides having 6 carbon atoms and disaccharides, oligosaccharides or polysaccharides formed from units having 6 carbon atoms or mixtures thereof in the presence of at least one quaternary ammonium salt R3R′N+X−; in which: —R, which is the same or different, represents a C1-C16 substituted or unsubstituted alkyl group; —R′ belongs to the group consisting of: hydrogen, C1-C16 substituted or unsubstituted alkyl group, monocyclic substituted or unsubstituted aryl group; —X− represents an anion selected from chloride, bromide, iodide, fluoride, hydroxide, BF4− and PF6−; at a temperature of between 80 and 120° C., removing water from the reaction medium (dehydration stage) and obtaining a reaction mixture comprising the quaternary ammonium salt, HMF, any unreacted saccharide and having a water content of less than 30%