You can use the Object.fromEntries method // data is an object with the values inside formData let data = Object.fromEntries(formData.entries())