Claude Artifacts: What They Are and How to Use Them

ClaudeHow-To GuidesUpdated May 16, 2026
Quick Answer

Claude Artifacts are self-contained outputs — code, documents, HTML pages, or data — displayed in a separate panel next to the chat. When Claude creates an artifact, you can view, copy, download, or directly edit it without scrolling through the conversation. Artifacts appear automatically when Claude generates code, structured documents, or interactive content. No setup required.

What Artifacts Are

Artifacts are Claude's way of separating the conversation from the deliverable. When Claude generates a piece of code, a formatted document, or an HTML page, that output appears in a dedicated right-hand panel — the Artifact panel — rather than embedded in the chat text.

This solves a practical problem: long code blocks and structured documents are hard to read inside a chat stream. The Artifact panel gives them a dedicated space where you can view, edit, copy, and preview them cleanly.

The chat stays focused on discussion. The Artifact panel holds the output. Both update in sync as the conversation continues.

What Triggers an Artifact

Claude opens the Artifact panel automatically for:

  • Any code — Python, JavaScript, TypeScript, SQL, HTML, CSS, shell scripts
  • React components — with live preview in the panel
  • Complete HTML pages — with browser preview
  • SVG graphics — rendered visually
  • Markdown documents — formatted reports, READMEs, documentation
  • Structured data — tables, JSON, YAML configurations
  • Long-form documents — essays, plans, outlines over a certain length

Short conversational replies, brief code snippets used as inline examples, and explanations stay in the chat.

How to Work With Artifacts Effectively

Viewing and Navigating

The Artifact panel opens on the right. For long code files, use the scroll bar inside the panel. The panel is resizable — drag the divider between chat and panel to adjust how much screen space each gets.

Editing Directly

Click inside the Artifact panel to place your cursor. You can type, delete, and edit directly. This is good for:

  • Fixing typos in generated documents
  • Changing variable names
  • Adjusting formatting
  • Adding comments to code

For structural changes, it is usually better to describe the change in chat and let Claude regenerate.

Using the Preview Tab

For React and HTML artifacts, click the Preview tab at the top of the panel. This renders the code and shows the visual output. Toggle between Code and Preview to inspect and interact with the result. This is one of Claude's most powerful features for rapid UI prototyping — you can see a component rendered without leaving Claude.

Iterating on Artifacts

Reference the artifact directly in your follow-up messages:

  • "Add error handling to the function in the artifact"
  • "Change the heading color in the HTML to dark blue"
  • "Add a loading state to the React component"

Claude updates the artifact in place — you see the new version in the panel without scrolling back through the chat to find the original.

Copying and Using the Output

Click the copy icon (top-right of the Artifact panel) to copy the entire content. Paste it into:

  • Your code editor (VS Code, Cursor, JetBrains)
  • A document editor (Notion, Google Docs, Word)
  • A file on your computer
  • GitHub or a code-sharing tool

Practical Workflows Using Artifacts

Rapid prototyping: "Build a React login form with email, password, a submit button, and basic validation. Show me a preview." → Claude creates the component in an Artifact. Click Preview to see it rendered. Ask for changes. Iterate without leaving the chat.

Document drafting: "Write a project proposal document for a mobile app redesign. Use professional formatting with sections for Overview, Scope, Timeline, and Budget." → Claude writes a formatted markdown document in the Artifact. Edit sections directly or ask Claude to adjust specific parts.

Code generation and review: "Write a Python function that parses a CSV file and returns a list of dicts." → Claude writes the function in an Artifact. Ask follow-up: "Add type hints and error handling." The artifact updates.

SQL queries: "Write a SQL query that joins the orders and customers tables and returns total spend per customer for the last 30 days." → Claude writes the query in an Artifact. Copy directly into your database client.

Common Mistakes to Avoid

  • Re-asking from scratch when you want a small change — Reference the artifact in your message: "In the artifact, change X to Y." Claude updates it rather than starting over.
  • Not using Preview for visual content — If Claude generates a React component or HTML and you want to check it, click Preview before copying. Saves time debugging rendering issues in your own environment.
  • Ignoring the direct edit option — For tiny fixes (a typo, a renamed variable), just click and edit in the panel. You do not need to ask Claude every time.
  • Expecting server-side code to run in Preview — Preview only works for browser-side code (React, HTML, JavaScript). Python, Go, and other backend languages need to be copied and run locally.
  • Scrolling through chat to find old artifacts — Artifacts from earlier in the conversation are accessible by scrolling up in the chat and clicking on the artifact reference. You do not have to re-ask Claude to regenerate them.

Related Articles

Claude · How-To Guides

More Claude how-to guides guides

Browse all guides in this category to troubleshoot related issues faster.

Browse all guides →

Frequently Asked Questions

Claude creates an Artifact when the output is a standalone piece of content that makes sense to view or use on its own: code in any programming language, complete HTML/CSS pages, markdown documents, SVG graphics, React components, data tables, and formatted reports. Conversational replies and short explanations stay in the chat. Long structured documents and all code blocks automatically open in the Artifact panel.

Related Guides

Continue with nearby guides in the same topic to rule out adjacent causes faster.

Can't Log In to Claude: Every Fix for Every Login Error

If you cannot log in to Claude, the most common causes are using the wrong sign-in method (Google vs. Apple vs. email), a corrupted browser session, or a temporary Anthropic authentication issue. Start by clearing cookies for claude.ai, trying incognito mode, and using the exact sign-in method you used when you registered. Verification code issues are usually email delivery delays — check your spam folder and wait 5 minutes before requesting a new code.

How to Use Claude: Complete Beginner's Guide

To use Claude, go to claude.ai, create a free account with Google, Apple, or email, and start typing in the chat box. Claude responds immediately and handles writing, analysis, coding, research, and conversation well. The free plan uses Claude Haiku; Claude Pro ($20/month) unlocks the more capable Claude Sonnet and Opus models with higher usage limits. No setup required.

Claude Payment Failed: Why It Happens and How to Fix It Fast

Claude payment failures usually come from one of four causes: your card issuer blocking the charge, an expired or incorrect card on file, a billing address mismatch, or a temporary issue on Anthropic's payment processor. Start by updating your payment method in Settings → Billing, then retry. If that fails, call your bank to authorize the charge before trying again.

Claude Prompt Tips: How to Get Better Results Every Time

Claude follows detailed instructions well, so specificity is the biggest lever for quality. Tell Claude your role, the audience, the desired format, and what to avoid. Use the full context window — Claude handles long prompts better than most models. Ask for multiple versions, give iterative feedback, and specify constraints upfront rather than correcting after. The prompt is your only interface; writing it well is the skill.

Claude Something Went Wrong: Causes and Fixes

The 'something went wrong' error in Claude is a generic message that covers session issues, browser problems, and temporary server errors. Start by refreshing the page and signing out then back in. If the error persists, clear your browser cookies for claude.ai and try a private window. This error almost never indicates an account problem — it is usually a temporary connection or session issue.