Skip to content

CodeSandbox embed code generator

Paste any CodeSandbox URL — get a ready-to-paste iframe with a live, editable sandbox and preview.

How to embed CodeSandbox content

Paste a CodeSandbox link

Copy any codesandbox.io URL — a sandbox editor link or a shared sandbox.

Get the embed code

The tool detects the sandbox and generates the right embed HTML.

Copy & paste

Click Copy code, then paste the HTML into your blog, docs, CMS, or any HTML editor.

Why use our CodeSandbox embed code generator

No manual setup

Skip opening the Share dialog and copying embed options on CodeSandbox. Paste any sandbox link and get working embed HTML.

Live, editable sandbox

The embed runs the actual sandbox — readers can browse the file tree, edit the code, and see the preview update.

Customizable preview card

Switch to Card mode to customize colors, fonts, and layout before copying.

Free, no signup

Generate up to 50 CodeSandbox embeds per day. No login, no API key, no watermarks.

CodeSandbox Embed with one click.

Powered by the Microlink Embed API — the same infrastructure handling embeds at scale.

  • Runnable code editor

    The embed shows the code editor, file explorer, and a live preview, so readers can run and modify the project inline.
  • Editor and preview views

    Show just the code, just the preview, or both side by side — the responsive embed adapts to your layout.
  • Preview card fallback

    A styled preview card with title and image when native embedding is restricted.
  • Runnable code editor

    The embed shows the code editor, file explorer, and a live preview, so readers can run and modify the project inline.
  • Editor and preview views

    Show just the code, just the preview, or both side by side — the responsive embed adapts to your layout.
  • Preview card fallback

    A styled preview card with title and image when native embedding is restricted.

FAQ

How do I embed a CodeSandbox sandbox on my website?

Paste any codesandbox.io URL into the tool and click Generate. You will get a ready-to-paste iframe with a live, editable sandbox.

Is the embedded sandbox editable?

Yes. The embed shows the code editor, file tree, and a live preview, so readers can run and edit the project inline.

Can I choose to show only the code or only the preview?

Yes. CodeSandbox embeds support editor-only, preview-only, and split views, and the embed is responsive so it adapts to your layout.

What happens if a sandbox cannot be embedded directly?

If native embedding is restricted, the tool falls back to a styled preview card with the title and image that links to the sandbox.

Is this free?

Yes — 50 requests per day, no login, no credit card.