Next.js project playground

Work with imported components, pages, and API routes in a project workspace. Next.js uses a separate browser Node runtime with its own requirements.

Read the runtime requirements below.

pages/api/hello.ts
import type { NextApiResponse } from "next";

export default function handler(_req: unknown, res: NextApiResponse) {
  res.status(200).json({ message: "Hello from Next.js" });
}
Expected output
Node runtime → dev server → project preview

A real project structure

The browser starter includes Pages Router files, components, styles, and an API route.

A separate Node runtime

Install dependencies and run the project dev server inside the browser runtime.

Runtime compatibility

Existing App Router projects are preserved; a Pages starter can be opened with a backup.

How to use this tool

  1. Use HTTPS or localhost and a supported desktop browser.

  2. Open Studio, select Next.js, and read the runtime readiness message.

  3. Start Node runtime and inspect Terminal output before testing the preview or API route.

Limits and requirements

The browser Node runtime requires a compatible browser and host configuration. App Router can hit request-context errors in browser runtimes; export and use native Node for full framework compatibility. Commercial WebContainer production use needs an eligible provider license.

Provider’s commercial usage terms

Frequently asked questions

Will my source be saved?

Local drafts stay in this browser’s storage. Export a ZIP or source file to keep a separate copy. Cloud saves need a configured account and are sent to the site’s database.

Does this use AI?

Running code in this playground does not call an AI provider.

Can I use real account credentials in sample code?

Use test data for experiments. Browser code, source exports, console messages, and debug reports can expose values you put in them.