Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
The Object.fromEntries() static method transforms a list of key-value pairs into an object.
An iterable, such as an Array or Map, containing a list of objects. Each object should have two properties:
0A string or symbol representing the property key.
1The property value.
Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.
A new object whose properties are given by the entries of the iterable.
The Object.fromEntries() method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The iterable argument is expected to be an object that implements a [Symbol.iterator]() method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.
Object.fromEntries() performs the reverse of Object.entries(), except that Object.entries() only returns string-keyed properties, while Object.fromEntries() can also create symbol-keyed properties.
Note: Unlike Array.from(), Object.fromEntries() does not use the value of this, so calling it on another constructor does not create objects of that type.
With Object.fromEntries, you can convert from Map to Object:
With Object.fromEntries, you can convert from Array to Object:
With Object.fromEntries, its reverse method Object.entries(), and array manipulation methods, you are able to transform objects like this:
| ECMAScript® 2027 Language Specification # sec-object.fromentries |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Oct 30, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.