You can download your Lovable project two ways: connect two-way GitHub or GitLab sync, which is free on every plan and keeps a live repository updated with every change, or use Download codebase in the Code tab for a one-time ZIP, available only on paid plans. Both give you the real React codebase, not static HTML, and you fully own the exported code.
| Fact | Value |
|---|---|
| Tool | Lovable |
| Difficulty | Beginner |
| Time required | ~10 min |
| Compatibility | GitHub/GitLab sync: all plans, including Free. Download codebase (ZIP): Pro, Business, and Enterprise plans only. |
| Last updated | September 2026 |
Why Lovable has two different export paths
Lovable is built around chat-driven iteration, so the platform needs an export path that works for people who never touch a repository and one that works for people who want full git history. GitHub and GitLab sync solves the first case: it is free on every plan, requires no code knowledge, and keeps a real repository updated automatically as you keep prompting. Download codebase solves the second case: a one-time, complete snapshot for handoffs, backups, or migrating off the platform entirely, gated to paid plans because it represents a full, instant code transfer rather than an ongoing relationship. The two paths are not symmetric. Sync is bidirectional and continuous but locked to a single connected branch; renaming or moving the GitHub repo breaks the connection (GitLab is even less forgiving of renames). The ZIP is a dead snapshot the moment you download it, with no path back into Lovable. And critically, Lovable still cannot import an existing repository into a project, so no matter which export path you use, there is no reverse workflow, only forward export.
- GitHub/GitLab sync gives every plan continuous, versioned access without requiring the Code tab's paid features
- Download codebase is gated to paid plans because it represents an instant, complete code handoff rather than an ongoing sync
- Renaming or moving a synced repository breaks the connection, especially on GitLab
- Lovable cannot import an existing repository, so exporting is always one-directional the first time you connect
Error messages you might see
Download codebase button is disabled or missingThis feature is limited to Pro, Business, and Enterprise plans. Upgrade the workspace, or use GitHub/GitLab sync instead, which is free on every plan and gives you the same code as a repository.
GitHub connection fails or the repository does not appearConfirm you authorized the correct GitHub account or organization during the connection flow, and check that you have not already connected this project to a different repository. Lovable always creates a new repository — it cannot attach to or import one that already exists.
Changes stopped syncing to GitHub after a renameRenaming, moving, or transferring a connected repository can break the sync, particularly on GitLab. Reconnect the integration from Settings then Connectors, which creates a fresh repository if the original connection cannot be recovered.
Before you start
- A Lovable account — the Free plan is enough for GitHub/GitLab sync
- A GitHub or GitLab account if you want continuous, versioned sync
- A Pro, Business, or Enterprise plan if you specifically need the one-click ZIP download
- A hosting provider (Vercel, Netlify, or similar) ready if you plan to self-host after exporting
How to fix it
Decide between live sync and a one-time download
The two export paths solve different problems, and picking the wrong one means redoing the setup later
GitHub/GitLab sync creates a repository that stays updated with every prompt you run in Lovable, which is what you want for ongoing development, version history, or connecting external tools like Codex or Claude Code. Download codebase gives you a single ZIP snapshot of the code as it exists right now, which is enough for a one-off handoff to a client or a quick local look at the generated code. Most builders should set up sync early and treat the ZIP as a backup option, not the main workflow.
Expected result: You know whether you need continuous git-based access (sync) or a one-time snapshot (ZIP) before opening any settings.
Connect two-way GitHub or GitLab sync (free, all plans)
Sync is the only export option available on the Free plan and the only one that stays current automatically
Open your project and click the GitHub icon in the top-right corner of the editor, or go to Settings then Connectors. Choose Connect to GitHub or Connect to GitLab and authorize Lovable to access your account or organization. Lovable creates a brand-new repository (it cannot import an existing one) and pushes a commit for every change made in the editor from that point forward. The connection is two-way: edits made directly in the repository sync back into Lovable's editor as well, as long as you only work on the single branch Lovable is tracking.
Expected result: A new repository appears in your GitHub or GitLab account, and the connection status inside Lovable shows Connected.
Download a one-time ZIP from the Code tab (paid plans)
Sometimes you just need the current code without setting up a repository at all
Open the Code tab in the editor (this replaced what used to be called Dev Mode). You can browse and search every file for free on any plan. To get everything as a ZIP, click Download codebase. This is limited to Pro, Business, and Enterprise plans; Enterprise admins can further restrict who is allowed to trigger the download. If you are on the Free plan, upgrade or use GitHub/GitLab sync instead, since sync is free and gives you the same code in a more useful format.
Expected result: A ZIP file downloads containing the full project as it currently exists in the editor.
Understand what's actually inside the exported code
Knowing the structure prevents surprises when you open the code outside Lovable
You are getting a real React project, not a single HTML page. Projects created before May 13, 2026 are Vite + React single-page apps with Tailwind CSS and, in most cases, a Supabase-backed Lovable Cloud connection. Projects created after that date default to TanStack Start with full server-side rendering, which changes the routing and build structure but is still standard React and TypeScript underneath. Either way, expect a components folder, a pages or routes folder, a package.json with the exact dependencies Lovable used, and, if you connected Lovable Cloud, Supabase configuration and edge functions.
Expected result: You can open the exported folder in a code editor and recognize a standard React project layout.
Self-host the exported code on your own infrastructure
Downloading the code is only useful if you can actually run it somewhere outside Lovable
For the GitHub/GitLab path, connect the repository to Vercel, Netlify, or another host directly from that host's dashboard, and it will build and deploy on every push automatically. For a downloaded ZIP, unzip it and import the folder into your host's dashboard-based project creation flow. Either way you will need to recreate any environment variables and secrets that lived in Lovable's Cloud tab, since those are never included in the export. If you are migrating a project with a real database, custom domain, and multiple integrations, RapidDev's engineers handle Lovable-to-production migrations like this as part of their standard $13K-$25K engagements, so you are not reverse-engineering the Cloud tab configuration alone.
Expected result: The exported project runs on your own hosting, independent of Lovable, with its environment variables re-configured.
Complete code example
1my-lovable-project/2├── src/3│ ├── components/ # UI components, including shadcn/ui primitives4│ ├── pages/ # route-level pages (Vite SPA projects)5│ │ or app/routes/ # route-level files (TanStack Start SSR projects, post-May 2026)6│ ├── hooks/ # custom React hooks7│ ├── lib/ # utilities, Supabase client setup8│ └── index.css # Tailwind entry point9├── supabase/10│ ├── functions/ # Edge Functions, if Lovable Cloud is connected11│ └── migrations/ # database schema history12├── public/ # static assets, favicon13├── package.json # exact dependency versions Lovable used14├── tailwind.config.ts15├── tsconfig.json16└── index.html # SPA entry point (Vite projects only)Best practices to prevent this
- Connect GitHub or GitLab sync from day one instead of waiting until you need to export — it doubles as your version history
- Treat Download codebase as a backup or handoff tool, not your primary workflow, since it has no path back into Lovable
- Never rename, move, or delete a repository once it is connected to a Lovable project — this breaks the sync, especially on GitLab
- Check whether your project uses Vite or TanStack Start before assuming the folder structure — projects created after May 13, 2026 default to TanStack Start with SSR
- Re-create environment variables and secrets manually after export — Lovable Cloud secrets are never included in a GitHub push or ZIP
- Keep the lovable.app preview open while testing your self-hosted export so you can compare behavior side by side
- Document your Supabase or Lovable Cloud configuration separately, since database schema and auth settings live outside the exported code
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I just exported my Lovable.dev project and want to run it outside Lovable. Here is my setup: - Export method: [GitHub/GitLab sync or ZIP download] - Target host: [Vercel/Netlify/other] - Stack: [Vite + React or TanStack Start, whichever the project shows] - Uses Lovable Cloud: [yes/no] Please help me: 1. List every environment variable I likely need to recreate outside Lovable 2. Walk through connecting this repo to my chosen host 3. Flag anything specific to a Vite SPA vs a TanStack Start SSR project that could break on export 4. Suggest a checklist to verify the exported app matches the Lovable preview
Create a README.md documenting every environment variable and Lovable Cloud secret this project depends on, without including the actual secret values. Also list the exact Node version and package manager this project expects, so I can run it correctly outside Lovable.
Frequently asked questions
How do I download my project from Lovable?
There are two ways. Connect two-way GitHub or GitLab sync (Settings, then Connectors, or the GitHub icon top-right) to get a live, continuously updated repository on any plan, including Free. Or, on a paid plan, open the Code tab and click Download codebase to get a one-time ZIP of the current code.
Can I export my Lovable project to GitHub?
Yes. Click the GitHub icon in the top-right of the editor, or go to Settings then Connectors, and choose Connect to GitHub. Lovable creates a new repository under your account or organization and pushes every future change as a commit. GitLab works the same way through the same Connectors panel.
How do I download my Lovable project as a ZIP file?
Open the Code tab in the editor, find the export option, and click Download codebase. This packages your current code into a ZIP you can unzip locally. Download codebase is available on Pro, Business, and Enterprise plans; the Free plan can browse the Code tab but not download the full ZIP.
Does Lovable export static HTML, or is it a full codebase?
It is a full React codebase, not a single static HTML file. Projects created before May 13, 2026 are Vite + React single-page apps; projects created after that date use TanStack Start with full server-side rendering by default. Either way you get a real, editable source tree with components, styles, and configuration files.
Can I import my downloaded Lovable code back into a new Lovable project?
No. Lovable still does not support importing an existing repository. Connecting GitHub or GitLab to a project always creates a brand-new repository from Lovable's current code, so a downloaded ZIP or an external repo cannot be pulled back in as a starting point.
Do I own the code Lovable generates?
Yes. Code generated in your Lovable project is yours to use, modify, host anywhere, and export freely, whether through GitHub/GitLab sync or a ZIP download. Lovable does not retain any code ownership claim over what your workspace builds.
Why is the Download codebase button greyed out for me?
Download codebase is gated to Pro, Business, and Enterprise plans. On the Free plan you can still browse and search code in the Code tab, but the full ZIP export requires a paid subscription, or you can use GitHub/GitLab sync instead, which is free on every plan.
What if I can't fix this myself?
If you are exporting a project to hand off, migrate to your own infrastructure, or extend past what Lovable can build alone, RapidDev's engineers handle Lovable code exports, GitHub migrations, and production hardening as part of their standard $13K-$25K project engagements.
Talk to an Expert
Our team has built 1,000+ apps. Get personalized help with your issue.
Book a free consultation