var f = new FormData(e.target); var q = new URLSearchParams(); for (const [key, val] of f.entries()) { q.append( key, val ); } console.log( q.toString()+"\n"+$(e.target).serialize() );