Migrate Webflow to Next.js
The migration in three pieces
A Webflow → Next.js move splits cleanly into three pieces:
- Static pages— Home, About, Pricing, etc. These are easy: rebuild as React components, or paste the exported HTML inside a Next.js page if you're in a hurry.
- CMS collections — Blog posts, case studies, docs. These are the awkward part, because Webflow stores them as records and Next.js wants files. The export bridges that.
- Assets and SEO plumbing — Images,
sitemap.xml,robots.txt, redirects. Mostly mechanical.
From Webflow to a running Next.js site
- 1
Export the site
Paste your Webflow API token into Webflow Export, scan, then download. You'll get a ZIP with rendered HTML, every CMS collection as Markdown / MDX / JSON, and every asset.
- 2
Spin up a Next.js project
npx create-next-app@latest my-site, App Router, TypeScript, Tailwind. Doesn't matter what design system you use — what matters is the directory shape. - 3
Drop in the CMS content
Move each collection folder from the export into
src/content/. Move theassets/folder intopublic/so the relative paths still resolve. The exported Markdown is already shaped to be read by@next/mdx, Contentlayer, or your own loader. - 4
Wire MDX with the App Router
Use
@next/mdxwithpageExtensions: ["ts", "tsx", "mdx"]. For collections, write a tiny loader:// src/lib/posts.ts import { readdirSync } from "node:fs"; export function getPostSlugs() { return readdirSync("src/content/blog-posts") .filter((f) => f.endsWith(".mdx")) .map((f) => f.replace(/\.mdx$/, "")); } export async function getPost(slug: string) { const mod = await import(`@/content/blog-posts/${slug}.mdx`); return { ...mod.metadata, default: mod.default }; }Then
generateStaticParamsovergetPostSlugs()and you have a working blog with statically generated pages. - 5
Rebuild static pages as React
Pages without CMS data are the fastest to rebuild. The exported HTML is a useful reference for layout, classes, and copy, but you'll usually rewrite them as React components so they participate in your component library and design tokens.
- 6
Carry over the SEO plumbing
Add a
sitemap.tsthat walksgetPostSlugs(), arobots.ts, and a redirects block innext.config.tsfor any URLs that changed shape during the move. - 7
Deploy to Vercel
vercel --prod. With static content and ISR, the site is faster than the Webflow original and free on the Hobby tier (or Pro if you're commercial). See where to host an exported Webflow site for the alternatives.
What survives, what you rebuild
| Layer | From the export | Effort to integrate |
|---|---|---|
| Static pages (HTML) | Rendered HTML per route | Reference for rebuild; not the final shape |
| CMS collections | Folder of .md + .mdx + .json | Drop into src/content/ |
| CMS rich text | Clean Markdown / MDX | Reads via @next/mdx |
| CMS reference fields | Slug arrays in front-matter | Resolve at build time |
| Assets | All images, fonts, files | Move to /public |
| Webflow interactions (JS) | webflow.js bundled in static export | Replace with Framer Motion or CSS |
| Form handlers | Not exported | Server action / API route |
| Sitemap & robots | Exported, but for old domain | Regenerate via sitemap.ts |
Performance changes you’ll feel
Static Webflow pages serve fast, but the moment you have a real CMS — image-heavy blog posts, dynamic collection lists — you start paying for it: every page needs Webflow's renderer, and image transforms run through Webflow's CDN. The Next.js equivalent is the same content built into static HTML at deploy time, with next/image handling responsive variants against your own asset folder.
On the sites we've helped migrate, LCP improvements of 30–50% are common, mostly from removing Webflow's runtime CSS injection and from next/imagebeing more aggressive about modern formats and sizes than Webflow's CDN.
FAQ — Webflow to Next.js
- Do I have to use MDX for the CMS content?
No. The export gives you JSON, Markdown, and MDX side-by-side. If you want to keep content out of MDX, read the JSON in a Server Component and render with plain HTML or a Markdown renderer.
- How do I handle reference fields like 'Author' on blog posts?
Reference fields export as slugs. At build time, read the referenced collection into a
Mapkeyed by slug and resolve. Typically a one-line lookup per post.- Can I keep Webflow as the editor and just rebuild the frontend?
Yes — many teams do this. Re-run the export on a schedule (or via webhook) and rebuild the Next.js site. You get a faster frontend without retraining the marketing team. We sometimes call this the “Webflow as headless CMS” pattern.
- What about Webflow Interactions — animations, scroll triggers?
The export includes Webflow's JS bundle, but if you're rebuilding as React you'll usually rewrite interactions using Framer Motion, GSAP, or CSS — both because they integrate better and because you don't want a runtime dependency on Webflow's animation engine.
- What's the fastest way to migrate just the blog?
Export the site, copy the
blog-posts/folder from the export intosrc/content/, set up a[slug]/page.tsxroute with dynamic import of the MDX file,generateStaticParamsover the slugs. About 30 minutes of setup.
Ready to try it?
Paste a Webflow API token, scan the site for free, and only pay when you download. Every page, asset, and CMS item is included.
Related
Last updated May 19, 2026