You can get HTML from a Figma design in three main ways: use a code-export plugin or Dev Mode to generate markup from frames, copy CSS properties and rebuild the structure by hand, or export assets and let a developer or AI tool assemble the page. The right method depends on whether you need a quick prototype, production-ready semantic HTML, or a clean handoff. Figma doesn't ship a built-in "export to HTML" button that produces a complete website, so the practical answer is a workflow, not a single click. This guide walks through each route in order, tells you what to expect, and shows how to check whether the output is actually usable.

One clarification up front: the question is ambiguous about what "HTML code" means. It could mean a static page that looks like the mockup, a component library's markup, or a spec a developer implements. Each goal changes the tool you pick and the cleanup you'll do afterward. The steps below cover all three, and the checks at each stage tell you when to stop automating and start editing.

What Figma Can and Can't Give You Directly

Figma's native export options cover PNG, JPG, SVG, PDF, and (in some plans) CSS and iOS/Android code snippets through Dev Mode. There's no menu item that turns a full artboard into a responsive HTML page. Historically, Figma's own "Copy as code" features have been limited and tied to paid plans; the Dev Mode inspect panel, introduced in 2023, exposes CSS for selected layers and works best as a measurement and styling reference, not a page generator.

That distinction matters. Figma stores a design as a tree of frames, groups, text layers, and components with absolute positions. HTML is a document flow with semantics, accessibility, responsiveness, and state. Converting one to the other means deciding how fixed positions become flexible layout, how layers become semantic elements, and how repeated components become reusable markup. No exporter makes those decisions perfectly for you.

The practical result: every method below produces a draft. For prototypes and internal demos, the draft may be good enough as-is. For production, plan on a cleanup pass where you fix structure, naming, responsiveness, and accessibility.

Prerequisites Before You Export Anything

Before touching a plugin, get the file into a state that produces clean output. Skipping this step is the most common reason generated code looks nothing like the design.

Organize layers. Rename frames and groups to reflect their role (for example header, hero, card-grid). Many plugins derive class names, IDs, or component names from layer names, so Frame 427 becomes frame-427 in your markup. Use Auto Layout. Frames built with Auto Layout map far more naturally to flexbox than free-positioned layers. A frame with horizontal Auto Layout, gap, and padding usually converts to a flex container with gap and padding values in CSS. Flatten unnecessary nesting. Deeply nested groups create wrapper divs that add noise. Grouping for visual convenience in Figma doesn't need to survive into HTML. Build a component system. Use Figma components and variants for buttons, inputs, and cards. Exporters that recognize components produce cleaner, repeatable markup, and handoff is easier because the developer can map one Figma component to one code component. Check text styles and color styles. Named styles convert to reusable CSS classes or variables more reliably than ad hoc fills and font sizes. Know your plan. Some inspection and code features are gated by Figma plan tier. Verify what your seat can access in the current Figma interface, since plan entitlements have changed over time.

A simple test of readiness: if you gave the file to a developer with no explanation, could they guess the intended structure from layer names alone? If not, the exporter will struggle too.

Method 1: Use a Code-Export Plugin

Plugins are the fastest route from a Figma frame to a runnable HTML draft. The Figma Community hosts many options, and their output quality and pricing change frequently, so treat any specific plugin as something to evaluate rather than a fixed recommendation.

Steps:

1: Open the file in Figma and select the frame or screen you want to convert. Start with one screen, not the whole file. 2: Open the plugins menu (in the Figma toolbar or the Resources panel) and search for HTML or code export plugins. Look for ones with recent updates and output previews. 3: Run the plugin on your selection. Most ask you to choose a framework (plain HTML/CSS, React, Tailwind, Vue, and so on) and a styling approach. 4: Review the generated code in the plugin's preview before exporting. Check whether layout uses flexbox or absolute positioning, and whether text is real text rather than images. 5: Export or copy the output, then open it locally in a browser. 6: Compare the rendered page against the Figma frame side by side at the same viewport width.

What to expect: Plugins generally do best with Auto Layout frames, simple hierarchies, and standard text layers. Complex effects like blur, blend modes, gradients with many stops, and mask groups often come out approximated or broken. Output for a moderately complex screen is typically a starting point that needs an hour or two of cleanup, not a finished page.

Success check: The rendered draft matches the design at desktop width, text is selectable (not baked into images), and the CSS uses layout properties you recognize. If the output is mostly position: absolute with pixel coordinates, the plugin didn't understand your layout—go back and add Auto Layout before retrying.

Failure to watch for: Plugins that ask for broad file permissions. Review what a plugin can access before installing, and prefer ones with a clear publisher and recent maintenance.

Method 2: Inspect and Rebuild With Dev Mode or the Inspect Panel

This method produces less code automatically but gives you the most control, and it's the most reliable path to production-quality HTML. The idea is to read each element's dimensions, spacing, typography, and colors from Figma's inspect panel, then write the markup yourself.

Steps:

1: Switch to Dev Mode (or open the inspect panel, depending on your plan and Figma version). 2: Select the outermost frame and note its width, padding, and layout direction. This becomes your main container. 3: Work top to bottom. For each section, note the layout: is it a row, a column, or a grid? Read the gap and padding values. 4: For each text layer, copy the font family, size, weight, line height, and color. Map them to CSS classes rather than inline styles. 5: For each image or icon, export it as SVG (for icons and simple graphics) or PNG/WebP (for photos) using Figma's asset export. 6: Write semantic HTML: header, nav, main, section, article, footer, and real button and a elements. Don't copy div structures literally from the layer tree. 7: Apply CSS using flexbox or grid based on what you observed in step 3. Use relative units and breakpoints rather than fixed pixel widths everywhere. 8: Compare in the browser at multiple widths.

Worked example: Suppose a card in Figma is a vertical Auto Layout frame with 16 px padding, 12 px gap, a 24 px corner radius, and contains an image, a title at 18 px/600 weight, and a body at 14 px/400. The CSS becomes a flex column with gap: 12px; padding: 16px; border-radius: 24px, an img, an h3, and a p. Nothing exotic—but you had to read four values and make two semantic choices (h3, p) that the inspect panel never told you.

Success check: Your page matches at the design width and degrades sensibly at narrower widths. Text is reachable by keyboard, buttons are real buttons, and the HTML validates.

When to stop and get help: If the design depends on interactions, animations, or data states you can't infer from static frames, rebuilding by hand risks guessing wrong. At that point, a conversation with the designer about behavior and responsive intent is the right move, not more inspection.

Method 3: Export Assets and Use an AI or Code-Generation Tool

A newer route pairs Figma's asset export with a code-generation tool—either a developer-side AI assistant or a design-to-code service. The workflow: export the frame as a clean image or structured file, feed it to the tool, then iterate on the output.

Steps:

1: Prepare the frame as in the prerequisites section; clean layers produce better guesses. 2: Export the frame as a high-resolution PNG or, if the tool supports it, a structured export (some tools accept Figma file links or SVG). 3: Ask the tool for semantic HTML and CSS, specifying the target: plain HTML/CSS, Tailwind, or a framework. 4: Review the output for structural mistakes: divs where landmarks belong, headings chosen by size rather than hierarchy, missing alt text. 5: Rebuild assets by exporting them separately from Figma rather than relying on the tool to reproduce them. 6: Test responsively and fix the breakpoints the tool guessed.

What to expect: These tools are good at producing plausible-looking markup fast and weaker at matching exact spacing and typography. You'll often spend more time correcting subtle differences (line heights, letter spacing, shadow values) than you would writing clean CSS from inspected values. They shine when you need a rough prototype or a starting skeleton for a common layout.

Success check: The structural elements are sensible and the page renders without errors. Treat pixel accuracy as a separate pass.

Choosing Between the Methods

Method Speed Output quality Best for Main limit
Plugin export Fastest Draft Prototypes, internal demos, simple screens Breaks on complex layouts and effects
Inspect and rebuild Slowest Highest Production pages, design systems Requires front-end skills
AI/code-generation tool Fast Variable Skeletons, common layouts, exploration Needs correction; asset handling is manual

The criteria are comparable across rows: each is judged on time to first usable output, how close that output is to production, and the scenario it fits. They aren't interchangeable, which is why teams often combine them—plugin output for a quick internal build, inspect-and-rebuild for the shipping version.

Common Failure Cases and Fixes

Everything is absolutely positioned. Cause: layers weren't using Auto Layout. Fix: add Auto Layout to key frames and re-export, or rebuild those sections manually with flexbox.

Text is rendered as images. Cause: the exporter treated text layers as graphics, often because of unusual effects or fonts. Fix: simplify text styling, check that layers are actual text, and re-export.

Spacing looks off by a few pixels. Cause: mixed units, rounding, or line-height differences between Figma and the browser. Fix: read exact values from the inspect panel and set line heights explicitly; browsers and Figma compute text boxes slightly differently.

Fonts don't match. Cause: the font isn't loaded on the page. Fix: license and load the font via your site's font pipeline; if it's a Figma-only or unlicensed font, choose a substitute deliberately.

The page looks fine at desktop but breaks on mobile. Cause: the design only specified one width, or the exporter produced fixed widths. Fix: get responsive intent from the designer (which elements stack, hide, or resize) and implement breakpoints yourself.

Colors differ subtly. Cause: opacity, blend modes, or color profile differences. Fix: use exact hex values from the inspect panel and avoid stacking opacity on fills that were already semi-transparent.

Limits, Edge Cases, and What Needs Human Judgment

Exporters can't infer behavior. Hover states, focus rings, loading states, error messages, and animations live in the designer's head or in separate frames, and generated HTML rarely includes them. Accessibility is another gap: alt text, heading order, contrast, and keyboard navigation are decisions, not conversions.

Responsive design is the biggest structural limit. A Figma file may contain desktop, tablet, and mobile frames, but the exporter treats each as a separate page rather than deriving fluid behavior. Deciding how a three-column grid becomes one column, and at what width, is design and engineering work.

Data and content are also outside the design. Placeholder text in Figma ("Lorem ipsum," sample names) must be replaced with real content structures—lists, tables, dynamic fields—which changes the markup.

Finally, version matters. Figma's interface, plan features, and the plugin ecosystem change regularly, and plugin behavior can shift between updates. Verify the current capabilities of whatever tool you choose rather than assuming an older tutorial still applies.

A reasonable rule: automate the first draft, then budget real time for semantic structure, responsiveness, and accessibility. Teams that expect a finished page from an exporter are consistently disappointed; teams that treat export as scaffolding ship faster than teams that start from a blank file.

Frequently Asked Questions

Does Figma have a built-in HTML export?

Not a full-page one. Figma offers asset exports and, through Dev Mode, code inspection with CSS snippets for selected layers. Complete HTML pages come from plugins, third-party tools, or manual implementation.

Can I export a whole Figma file to a working website at once?

You can generate drafts of multiple frames, but a working website needs navigation, routing, responsive behavior, and real content. Expect to assemble and correct the output substantially.

Is the generated CSS safe to ship as-is?

Rarely. Generated CSS often uses absolute positioning, redundant classes, and fixed widths. Review it, consolidate styles, and replace fixed dimensions with flexible layout before shipping.

What if I don't know how to code?

Use a plugin that outputs plain HTML/CSS, then use a visual editor or site builder to assemble pages. For production sites, involve a developer for the cleanup pass—it's usually cheaper than fixing a broken auto-generated site later.