Skip to main content

Side by side

PromisevsAsync/Await

What is the difference between a promise and async/await?

Updated 2 min read7 differences

In short

A promise is an object for a value that arrives later; async/await is syntax built on promises that lets you wait for them in step-by-step code.

Promise

A promise is an object that represents the eventual result of an asynchronous operation, letting code react to success or failure once the work completes.

Read the page on Promise

Async/Await

Async/await is a syntax for writing asynchronous code that reads like ordinary step-by-step code, pausing at each await until a promise or task finishes.

Read the page on Async/Await

Promise and Async/Await compared

AspectPromiseAsync/Await
What it isAn object that represents a future valueSyntax for writing promise-based code
Code styleA chain of .then() callbacksStep-by-step code with await
Errors.catch() at the end of the chaintry/catch around the awaited steps
ReturnsA new promise from every .then()A promise from every async function
Running in parallelPromise.all, Promise.race and similar helpersStill uses Promise.all; plain await runs steps in order
DebuggingHarder to step through across many callbacksSteps through like synchronous code
Added to JavaScriptES2015ES2017

The difference, explained

A promise is an object that stands for the result of an asynchronous operation: it starts pending and later becomes fulfilled with a value or rejected with an error. Async/await is syntax for using promises: an async function always returns a promise, and inside it await pauses the function until a promise settles, then hands back its value or throws its error.

So they are not rivals; async/await is another way of writing the same thing. With promises alone, you chain a .then() for each step and end with a .catch() for errors. With async/await, the same steps read top to bottom like ordinary code, local variables stay in scope from one step to the next, and errors are handled with a regular try/catch.

You still use promises directly in async code. Running independent tasks at once needs Promise.all, Promise.allSettled or Promise.race, and wrapping an old callback or event API takes new Promise. A common mistake is awaiting independent calls one after another, which makes them run in sequence; start them together and await them with Promise.all instead.

Another misconception is that await blocks the program. It pauses only the async function it is in; the event loop keeps handling clicks, timers and other requests in the meantime. Both styles perform the same, so the choice is about readability: async/await for sequences of steps, promise methods for combining several operations.

Which one should you use?

Choose Promise when…

  • You run several operations at once and combine them with Promise.all or Promise.race.
  • You wrap a callback- or event-based API in new Promise so it can be awaited.
  • A short, one-step chain reads clearly enough on its own.

Choose Async/Await when…

  • The code is a sequence of steps that depend on each other.
  • You want to handle errors with ordinary try/catch blocks.
  • You need loops or conditions between asynchronous steps.

Loading a user's paid orders, both ways

Promisejavascript
// Promise chain: each step in a .then()
function loadPaidOrders(id) {
  return fetchUser(id)
    .then((user) => fetchOrders(user.id))
    .then((orders) => orders.filter((o) => o.paid))
    .catch((error) => {
      console.error("Could not load orders", error);
      return [];
    });
}
Async/Awaitjavascript
// async/await: the same steps, top to bottom
async function loadPaidOrders(id) {
  try {
    const user = await fetchUser(id);
    const orders = await fetchOrders(user.id);
    return orders.filter((o) => o.paid);
  } catch (error) {
    console.error("Could not load orders", error);
    return [];
  }
}

Readers ask

Is async/await better than promises?

It is easier to read for most sequential code, but it is not a replacement: it is built on promises and uses them underneath. Most modern code mixes both, with await for steps and Promise.all for parallel work.

Is async/await slower than promises?

No meaningful difference. Both run on the same promise machinery; the real slowdown comes from awaiting independent tasks one by one instead of together.

Can I await any promise?

Yes. await works with any promise, or any object with a then method, including promises returned by libraries written before async/await existed.

More

Settings