Online React Playground — Build and Share React Apps in the Browser

Write React components with TSX, use hooks and Context API, preview live output, view console logs, and share your app via URL — all with zero setup.

React 18 Ready

Write TSX, Preview Live, Share Instantly.

The deepest, fastest way to prototype React applications in your browser. No Node.js, no npm, no config. Just open the page, type TSX, and see the magic unfold instantly in real-time.

The Coolest & Simplest React Sandbox

Everything you need to prototype, test, and build out of the box with zero configuration.

📦

Smart NPM Packages

Search and install any NPM package from our built-in Packages panel, or just type import in your code. We auto-resolve everything via esm.sh!

🌊

Native Tailwind CSS

Tailwind is supported by default. Just add @tailwind base; to your CSS tab and start styling instantly.

🔗

Instant Sharing

Click Share to generate a unique link containing your exact code. Perfect for saving templates, asking for help, or showing off.

📥

One-Click Download

Love what you built? Click the ZIP button to download a ready-to-run index.html with your app bundled inside.

📋

7 Starter Templates

Don't start from scratch! Use our rich templates including Formik Auth, Tailwind Landing UI, Context API, and CSS Animations.

🪵

Integrated Console

Debug effectively with our built-in console panel that intercepts logs, warnings, errors, and unhandled promise rejections.

Master the Sandbox

Discover how to harness the full power of our in-browser engine.

NPM Packages

Add External Libraries in Seconds

Want to use framer-motion, formik, or canvas-confetti? It's incredibly simple!

  • Open the 📦 Packages panel to search the complete NPM registry and install items with a single tap.

  • Or even simpler: Just type an import statement directly in your React code. Our auto-installer detects the package and dynamically provisions it for you via ESM.

App.tsx
import confetti from "canvas-confetti";

export default function App() {
  return (
    <button
      onClick={() => confetti()}
      className="btn"
    >
      🎉 Celebrate!
    </button>
  );
}
Styling

Seamless Tailwind CSS Integration

Styling with Tailwind CSS has never been this easy in a zero-setup browser editor. We built native support right in.

  • Switch to the 🎨 index.css tab and paste the core Tailwind directives.

  • The moment we detect the @tailwind directive, our engine automatically injects the Tailwind JIT compiler.

  • You can instantly leverage utility classes anywhere in your TSX code!

index.css
@tailwind base;
@tailwind components;
@tailwind utilities;

/* That's it! Tailwind is now active. */
Export & Share

Save as Templates, Share, or Download

Easily save your progress, download your code, or share your creations with the world.

  • 🔗
    Share URL

    Click Share to compress your entire code setup into a highly efficient, encoded URL. Bookmark the URL to treat it as a saved template.

  • 📥
    Download ZIP

    Want to take your prototype offline? Download a ready-to-use HTML and JSX bundle that runs flawlessly on your local machine.

🔗

Share Code

Generates a unique, permanent link.

📥

Export ZIP

Downloads App.tsx and styling locally.

Responsive

Pixel-Perfect Device Testing

Stop guessing how your Tailwind classes will look on a phone. Instantly switch between true-to-life Desktop, Tablet, and Mobile viewports.

  • Auto-Scaling Viewports: The sandbox calculates the exact zoom ratio to fit the entire device within your screen without overflow.

  • Realistic Bezels: Work with actual hardware constraints. Our mobile preview features a dynamic island notch and a home indicator, while the tablet preview includes standard iPad bezels.

Share & Preview

Interactive Previews & Smart Sharing

Pop your code out into a full-screen preview tab while you work, or generate powerful share links with granular permissions.

  • ↗️
    Instant Preview Tabs

    Click the Open Preview button to instantly launch your live React app in a dedicated, distraction-free browser tab.

  • 🔒
    Granular Link Control

    When sharing, choose between sending the full Editor or just the Live Preview. For previews, securely toggle between Editable and Read-Only access for your viewers.

🚀Share Code
Link Type
👁️ Live Preview
📝 Full Editor
Permissions
Editable Preview
Viewers can open the editor.
Read-Only Preview
The "Open Editor" button is hidden. Perfect for showcases.
playboxjs.com/playground/react/p...
Copy

Who Is This For?

React developers prototyping components or testing new API patterns rapidly.

Beginners learning React hooks, state management, and TSX syntax in a safe environment.

Educators creating live, interactive React demos for students with zero setup.

Developers sharing bug reproductions or mini-apps seamlessly with their team.

Interview candidates preparing and practicing React challenges instantly.

Open source contributors quickly demonstrating feature proposals and PRs.

Have a Suggestion?

We're constantly improving the React Sandbox. Share your ideas, request features, or report any issues you encounter!