Prompt to convert a Webflow export to Next.js
This prompt asks an AI coding assistant to turn a WebExport copy of a Webflow site into a Next.js App Router project with the same pages, URLs and design. It keeps webflow.js until each interaction is rebuilt, swaps forms for your endpoint, and writes notes on what it could not convert.
Last reviewed
Key facts
- Each exported Webflow page becomes app/<route>/page.tsx, and shared markup moves to app/layout.tsx.
- Navbar, dropdown, tabs and slider components are driven by webflow.js, so the script stays until you rebuild them.
- Webflow’s help says forms do not work in exported code, so the prompt replaces them.
- Test status: Next.js steps tested on a real export (Next.js 16.4.6), Webflow cleanup not yet tested.
The prompt
Paste this into your AI coding assistant with the unzipped export open, and replace the placeholders in square brackets.
You are helping me move a static export of a Webflow site to Next.js.
CONTEXT
- ./exported-site is a WebExport download of my Webflow site: HTML, CSS, JavaScript, fonts and images.
- Live site for comparison: [LIVE_URL]. Final domain: [DOMAIN]. Host: [HOST: Vercel, Netlify, Cloudflare Pages, Amazon S3 or Nginx].
TARGET: Next.js
- Next.js App Router project in TypeScript, one page per route in app/<route>/page.tsx, shared header and footer in app/layout.tsx.
- Assets go to public/. Load needed scripts with next/script.
- Static export: [STATIC_EXPORT: yes or no]. If yes, set output to export and keep redirects and headers in the host's files.
WEBFLOW-SPECIFIC CLEANUP
- Keep webflow.js and the data-w-id attributes until each interaction has been rebuilt. List every interaction first and ask me whether to keep or rebuild it.
- Keep classes with a w- prefix (w-nav, w-dropdown, w-tab, w-slider, w-form). Webflow scripts control them.
- Forms: keep the fields and labels, set the action to [FORM_ENDPOINT], and report any form you could not convert.
- Search for website-files.com in HTML, CSS, inline styles and Lottie data-src values. Download or replace each hit.
RULES
- Keep the design and every URL path. List path changes in REDIRECTS.md.
- Do not invent content, prices or links. Report gaps in MIGRATION_NOTES.md.
- Build after each step and ask before deleting a script or stylesheet.
START
Inventory the folder, show me a plan, wait for my go-ahead, then convert the home page only.How to run it
- Unzip the download to ./exported-site and open the project in your AI coding tool.
- Paste the prompt, approve the plan, then commit after each page that matches the live site.
What to expect from Webflow to Next.js
A Webflow export holds finished HTML with Webflow’s class names, a CSS file written against those names and the Interactions scripts. The cheapest correct conversion keeps the markup and classes as they are and moves each page into a route. Renaming classes at this stage multiplies the work and the bugs.
Ask for the conversion in two passes. The first produces a site that looks the same and still loads webflow.js. The second replaces the pieces you want to own, such as the navbar, forms and sliders. Between the passes, compare the build with the live site at phone and desktop width.
Questions the assistant should ask you
- Which Webflow interactions do you want to keep as they are, and which can become CSS?
- Should CMS item pages stay as separate files for now, or move into a dynamic route?
- Which endpoint should the forms post to?
Verify the result
Run these from the project folder after each batch. The last command lists files that still refer to Webflow.
npm install
npm run build
npm run start
# pages in the export vs routes in the project
find exported-site -name "*.html" | wc -l
find app -name "page.tsx" | wc -l
# files that still refer to the old platform
grep -rlE "website-files.com" app public | head- next build finishes with no type or lint errors, and every old sitemap route returns 200.
- With output set to export, the out folder holds one HTML file per route.
- Submit each form once and confirm the message arrives where you expect.
- Scroll every page with the console open and confirm no animation script returns 404.
What can go wrong
- The assistant removes webflow.js early, and the navbar, dropdowns and animations stop working. The prompt tells it to leave the script in place and list each interaction first.
- CMS item pages are plain HTML files, so the assistant may copy every post into its own page file. After the first pass, ask for one dynamic route that uses generateStaticParams, or use the CMS to MDX prompt.
- Classes with a w- prefix look like noise but belong to Webflow components. Deleting them breaks layouts.
Frequently asked questions
Should the Next.js version keep Webflow’s class names?
Yes at first. The CSS file is written against them, so keep the classes, get a matching build, then rename in small steps and compare after each one.
Can I deploy the result as a static export?
Yes, by setting output to export in next.config. Next.js lists redirects, headers, rewrites, server actions and the default image loader as unsupported in that mode, so keep redirects and headers in your host’s own files. See Webflow on Cloudflare Pages.
What happens to Webflow forms?
They stop delivering once the site leaves Webflow. The prompt points each form at an endpoint you choose, and the forms prompt covers the options.
How much of a site fits in one session?
Start with the home page and one inner page. A site with dozens of pages is a series of sessions, so commit after each page that matches the live site.
Official documentation
Free tools for this job
- Webflow Code Cleanliness AuditAudit Webflow HTML for bloated interaction scripts, proprietary attributes, and form locks.
- Webflow → Vercel Migration ChecklistInteractive step-by-step checklist for migrating your site off Webflow hosting.
- No-Code Asset Path NormalizerRewrite CDN URLs to local relative paths for offline and self-hosted deployments.
- Redirect Map BuilderBuild an old-to-final redirect mapping from URL lists.
Start with the files
The prompt works on a WebExport download. Paste your public Webflow URL into the export form and get a ZIP. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.