---
title: "Framer to Astro: export your site as code · Deframer"
description: "Convert a published Framer site to an Astro 7 project in TypeScript: every page prerendered to HTML, one React island that keeps the layout. Free to convert."
url: https://deframer.co/framer-to-astro
---

Framer Astro

# Framer to Astro. Every page prerendered.

Paste your Framer site's address and get an Astro 7 project in TypeScript: every page prerendered to static HTML, hydrated as one React island with the same animations, interactions, CMS and forms. Moving between pages keeps the layout.

- Free to convert
- No card to start
- Astro picked for you

- 5.0 seconds Average conversion
- 236 Sites converted
- 100% TypeScript code

How it works

## Three steps, one Astro project

The same steps whatever the site. This page picks Astro; the converter lets you change it.

1. 01

   ### Paste your site's address

   Your published site on *.framer.website, *.framer.app or your own domain. Astro is picked for you.
2. 02

   ### Convert in seconds

   Conversions take 5.0 seconds on a typical day. Free, and you check the result before paying anything.
3. 03

   ### Download and run it

   A .zip of your Astro project in TypeScript, 289 files. Unzip, install, run. Nothing from Framer inside.

What you get

## An Astro project with one React island

realmehdi.com in Astro: 17 routes and 289 files. src/pages holds one index.astro per page beside its _route.tsx island. The React components inside are the same as in every other framework.

- ### Every page, a route

  17 routes in src/pages, each an .astro page, prerendered that sets its own title, description and canonical URL. Unknown paths get the site's 404.
- ### Components with typed props

  35 components, each a .tsx file with typed props and its own CSS module, keeping the variants and hover states the designer set.

  Props

  **variant?**

  **answer?**

  `string`

  **question?**

  `string`

  Files
  - faq-acordian.tsx 300
  - faq-acordian.module.css 211
- ### Breakpoints kept

  Desktop, Laptop and Phone stay three layouts, as media queries. The converted home page is pixel-perfect: 0.00% of pixels differ at 1440, 768 and 390.
- ### Fonts and text styles

  11 font stylesheets with @font-face rules, and 17 text styles as shared classes that change size at each breakpoint.
- ### Code components come along

  2 of the site's own and 8 from the marketplace, as source in src/code and src/vendor. 3 run only in the browser.
- ### Motion keeps its timing

  44 transitions, appear effects and hovers keep their springs: 35 of them stiffness 500, damping 60, played by motion.

The code

## Read every line. It's plain Astro.

Unedited files from realmehdi.com's Astro export, 289 files in all.

Files

src/pages/index.astro

```
---
// /: the page in its layout template (./_route.tsx), in the site's React island.
import Document from "@/site/document.astro";
import Site from "@/site/island";
// The route module's own styles, in the page's <head>.
import "./_route";

const head = {
  "meta": [
    {
      "title": "Mehdi Hassan Portfolio"
    },
    {
      "property": "og:title",
      "content": "Mehdi Hassan Portfolio"
    },
    {
      "property": "og:description",
      "content": "Helping startups design & develop breathtaking products & websites. 🌟 Expert in copywriting, design, & development."
    },
    {
      "property": "og:url",
      "content": "https://mehdihassan.framer.website/"
    },
    {
      "property": "og:image",
      "content": "https://framerusercontent.com/assets/h1lpVwE2dPBKzvByiXOr3ANSFDA.jpg"
    },
    {
      "property": "og:type",
      "content": "website"
    },
    {
      "name": "twitter:card",
      "content": "summary_large_image"
    },
    {
      "name": "twitter:title",
      "content": "Mehdi Hassan Portfolio"
    },
    {
      "name": "twitter:description",
      "content": "Helping startups design & develop breathtaking products & websites. 🌟 Expert in copywriting, design, & development."
    },
    {
      "name": "twitter:image",
      "content": "https://framerusercontent.com/assets/h1lpVwE2dPBKzvByiXOr3ANSFDA.jpg"
    }
  ],
  "links": [
    {
      "rel": "canonical",
      "href": "https://mehdihassan.framer.website/"
    }
  ]
};
---

<Document head={head}>
  <Site client:load transition:persist="site" route="_route" path="/" />
</Document>
```

localhost:3000 390

![The home page this file renders, from the converted build at 390 wide](https://deframer.co/_next/image?url=%2Fimages%2Fexamples%2Frealmehdi%2Fhome-390.webp&w=3840&q=75)

tsc --noEmit · 289 files · 0 errors

**`src/pages/**/index.astro`**

One per URL, with its metadata in its head; CMS items take theirs from a _head.json table.

**`src/site/document.astro`**

The document every page is rendered into; src/site/root.tsx wraps each page.

**`server.ts`**

Applies the site's redirects and URL forms (308), serves the prerendered pages and runs Astro's Node handler for the form routes.

**`src/pages/api/forms/<form>.ts`**

One API route per native form.

Run and deploy

## Unzip, install, run. Nothing from Framer.

An Astro project's build prerenders every page to static HTML, and its server.ts runs on Node.js 22.18 or later: any Node.js host, a container or your own server.

realmehdi-com · Astro

$

Only in Astro

## What Astro adds

- astro 7.3.8

  ### Prerendered at build time

  Every page, CMS items included, is rendered to its own HTML document by astro build, then hydrates as one React island.
- astro 7.3.8

  ### The layout stays

  A link loads the next page with Astro's router, which keeps the island: the layout template two pages share stays mounted, with an open menu or a navigation bar collapsed on scroll. Page transitions play as the browser's view transitions.

The same in every framework

## One project, every framework

Next.js, TanStack Start, Astro, React Router, Vite, Nuxt and Static HTML exports share everything below. Only the routes, the document, the server and the build differ.

- 35 components · 17 pages

  ### Pages and components

  Pages, layout templates and design components are React components in src/views, src/layouts and src/components, each with its CSS module. Components keep the designer's folders, variants and hover states.
- 17 text styles · 11 fonts

  ### Styles and fonts

  Colour styles become CSS variables in src/styles, shared text styles become classes, and every font family gets its @font-face rules.
- <collection>.json

  ### CMS content

  Each Framer CMS collection becomes a schema (src/cms/<collection>.ts) and its records as JSON (src/cms/<collection>.json).
- api/forms/<form>

  ### Forms

  Native Framer forms post to the project's own API route, with a rate limit, a honeypot and field checks, and deliver submissions to webhooks you set in environment variables. A Vite site, which has no server, posts them to a form service.
- 44 effects on motion

  ### Animations

  Animations and interactions run on motion, the open-source animation library. No Framer runtime: a small, readable kit in src/lib/deframer replaces it.
- robots.txt · sitemap.xml

  ### SEO files

  Every page keeps its title, description and social image. The site's redirects, robots.txt and sitemap.xml come with it, and a README lists every route.

Pricing

## Free to convert, one credit to download

Convert free and check the Astro result first. Pay only to download: one credit per project, credits never expire. Or pay once for the lifetime deal: unlimited conversions, and every site you verify downloads free.

1. **Convert for free** Paste your Framer URL and check the result.
2. **Download for 1 credit** One credit is one site's code, as a .zip.
3. **It's yours** Host it anywhere. Credits never expire.

- ### Single

  1 credit

  Download 1 site

  $20 one-time

  $20.00 per credit

  [Get 1 credit](https://deframer.co/sign-up?redirect_url=%2Fpricing)
  - One site, up to 100 pages
  - Your choice of 7 frameworks
  - Download the same export again, free
- ### Starter

  Most popular

  5 credits

  Download 5 sites

  $50 one-time

  $10.00 per credit instead of $20.00

  [Get 5 credits](https://deframer.co/sign-up?redirect_url=%2Fpricing)
  - Five sites, or one site five times as it changes
  - 50% less per credit than Single
  - Everything in Single
- ### Studio

  Best value

  50 credits

  Download 50 sites

  $100 one-time

  $2.00 per credit instead of $20.00

  [Get 50 credits](https://deframer.co/sign-up?redirect_url=%2Fpricing)
  - Client sites and large sites
  - 90% less per credit than Single
  - Or 5 downloads without verification

### Lifetime

50% off until 8 December

Unlimited

Download every site you verify, for life

- Never buy credits for a site you verify
- Unlimited conversions (fair use: 100 a day)
- First in the conversion queue
- 20 credits included: downloads without verification use 10 each

$197 Regular price $397 one-time

Only $97 more than Studio · Ends 8 December

[Get lifetime access](https://deframer.co/sign-up?redirect_url=%2Fpricing)

**Can't add a meta tag to the site?** A download without verification uses 10 credits, so Studio covers 5.

- No subscription
- Credits never expire
- Every framework included
- You own your site's code

Prices in USD. Checkout by Whop, our payment provider, which adds sales tax or VAT where it applies. Credits and the lifetime deal are added as soon as you pay and aren't refundable; see the [refund policy](https://deframer.co/refunds).

[Compare packs on the pricing page](https://deframer.co/pricing)

Limits

## What to expect

Plain facts before you convert.

- The result is close to the original but not guaranteed to be identical. Check every page, in the compare view when a live preview is available or by running the project.
- Code components and third-party embeds stay as the site's own code: they come across as source, not rewritten.
- Very large sites may not fit a conversion. Keeping images, fonts and videos on Framer's CDN (the default) makes the download much smaller.
- The project runs its own server.ts (Node.js 22.18 or later) for redirects and forms; the pages themselves are prerendered HTML.

FAQ

## Framer to Astro, answered

Limits, files and verification are in the [main FAQ](https://deframer.co/#faq), credits on the [pricing page](https://deframer.co/pricing#credits).

### Can I convert a Framer site to Astro?

Yes. Deframer converts a published Framer site into an Astro 7 project written in TypeScript, which you download as a `.zip` and own. Every page is prerendered to static HTML and hydrates as one React island, with the same animations, interactions, CMS and forms.

### Why one React island instead of many?

A Framer page is one tree: its layout, effects and interactions depend on each other. Keeping the page as one island renders it as published, and the island stays mounted between pages, so a shared navigation keeps its state.

### Is the Astro project a static site?

Its pages are: `astro build` prerenders every one to HTML. The project also runs a small `server.ts` on Node.js 22.18 or later that applies the site's redirects, serves those pages and handles the form routes with Astro's Node adapter. For a static site with no server, pick [Vite](https://deframer.co/framer-to-vite).

### Where do page titles and descriptions go?

In each page's `index.astro` head, or its `_head.json` table for CMS items; the site's own tags are in `src/site/head.ts`.

### What does it cost?

Converting is free. Downloading the code is for your own site, or one whose owner allows it: verify the site for a 1-credit download, or confirm you own it or have permission and download for 10 credits. See [pricing](https://deframer.co/pricing).

Get started

## Your site. Your Astro code.

1. Convert
2. Download
3. Deploy anywhere
