# Migrating Retool to Code: The Complete Playbook (2026)

- Tool: No-Code to Code Migrations
- Last updated: July 2026

## TL;DR

Retool is thriving at ~$120M ARR but per-seat billing ($65/standard user/mo) and the Feb 2026 self-hosting re-gating to Enterprise tier make migration an economic decision, not a rescue mission. App JSON exports but runs only on the Retool runtime — there is no source-code eject. Your source data is always in your own databases. Plan 8–12 weeks for a full rebuild.

## Platform status

- Status: active — Retool reached ~$120M ARR by Oct 2025 (+39% YoY, Sacra est.), driven by AI AppGen/Agents (public beta Oct 2025). Feb 2026 community thread confirmed self-hosting is now effectively Enterprise-tier only, reversing the 2021 open self-host position (community.retool.com/t/self-hosted-docs-now-state-enterprise-only/64586). Business tier is $65/standard user/mo.
- Migration urgency: medium
- Typical timeline: 8–12 weeks
- Typical cost: $13K–$25K (agency, fixed)

## Why migrate

Retool is excellent at what it does — the migration trigger is almost always economic or driven by lock-in as headcount grows.

- **Per-seat cost spiral** — Business tier at $65/standard user/mo. At 20+ users this exceeds the amortized cost of maintaining an in-house admin framework (Sacra 2025). Model your 12-month projected headcount before deciding.
- **Self-host now Enterprise-gated** — A Feb 2026 community forum thread confirmed self-hosting is no longer available on Team/Business tiers — only Enterprise. This reverses Retool's 2021 open self-host position and changes the cost model for teams that relied on it.
- **No code eject** — Apps export as JSON but run only on Retool's runtime (cloud or self-hosted Docker/K8s). Exit means a full rebuild regardless of what you export — the JSON is a config spec, not runnable code.
- **Feature gating** — SSO, audit logs, granular RBAC, and Git/source control are all gated to Business/Enterprise tiers. Free tier is capped at 5 users. As your compliance requirements grow, so does the tier cost.
- **AI lock-in acceleration** — AppGen/Agents (launched Apr–May 2025) tie workflows deeper into the proprietary runtime. The longer you build with AI-generated Retool apps, the costlier the eventual exit becomes.

## What you can export

Your source data is always in your own databases — Retool is a query layer, not a data store. The app itself (UI, logic, workflows) has no source-code eject path.

| Asset | Exportable | How |
| --- | --- | --- |
| Data | yes | Retool does not store your source data — queries run against your own databases (Postgres, MySQL, REST, etc.); your data is already yours and always has been |
| Code | no | Apps export as JSON config only via Retool Settings → Export |
| Design/UI | no | Component layout is Retool-proprietary; no export to HTML or React |
| Logic/Workflows | partial | SQL and JS queries are readable inside the exported JSON; workflow and AI Agent definitions are also present in JSON |
| Users & Auth | partial | SSO users (SAML/OIDC) are managed by your identity provider and are provider-side portable; built-in Retool users require a forced password reset |
| Scheduled Workflows | partial | Trigger cadences are visible in JSON export and in the Retool Workflows UI |

## Stack mapping

The target stack is Next.js (App Router) + Supabase/PostgreSQL — a maintained, self-hostable alternative that eliminates per-seat runtime costs.

| Platform concept | Code equivalent |
| --- | --- |
| Retool queries (SQL/JS over resources) | Next.js Server Actions + Supabase/Drizzle query layer |
| Retool resources (DB connections, REST APIs) | Supabase + environment-variable–secured Next.js Route Handlers |
| Retool components (tables, forms, buttons) | shadcn/ui + Radix UI React components |
| Retool workflows (scheduled + event-driven) | Supabase Edge Functions or Vercel Cron |
| Retool AI Agents / AppGen | Custom AI SDK integration (Anthropic/OpenAI) via Next.js Route Handlers |
| Retool RBAC / user groups | Supabase RLS + role column in users table |
| Retool Audit Logs | Supabase table with server-side write on every mutation |
| Self-hosted Retool (Docker/K8s) | Vercel + Supabase cloud, or self-hosted Next.js on Railway/Fly.io |

## Migration roadmap

Plan 8–12 weeks. The largest time sink is auditing SQL/JS logic embedded in component props — allocate this time before writing a line of replacement code.

### Phase 1: Extraction & Audit (Week 1–2)

- Export all app JSON via Retool Settings → Export
- Inventory every resource: document name, type, connection string, auth method
- Screenshot every page and every query output for parity testing
- Audit which users are on built-in auth vs SSO
- Document all scheduled workflow triggers and their cadence

> Watch out: SQL/JS query logic embedded in component props is easy to miss — do a systematic export review, not a spot check

### Phase 2: Foundation Setup (Week 2–3)

- Scaffold Next.js (App Router) + Supabase project
- Migrate all resource connection strings to environment variables
- Set up Supabase RLS schema and role column mirroring Retool user groups
- Configure SSO provider redirect URLs if applicable

### Phase 3: Query & Logic Migration (Week 3–6)

- Extract SQL queries from JSON export; refactor into typed Drizzle/Supabase service functions
- Rebuild Retool Workflows as Supabase Edge Functions or Vercel Cron
- Port AI Agent logic to Anthropic/OpenAI SDK Route Handlers
- Implement audit log table with server-side writes

> Watch out: Complex apps with 50+ queries may need a dedicated 2-week query-audit sprint

### Phase 4: UI Rebuild & Feature Parity (Week 5–9)

- Rebuild pages with shadcn/ui components using screenshots as spec
- Implement data tables, forms, and modals page by page
- Validate each page against the screenshot spec before moving on
- Build admin auth guard in Next.js middleware

### Phase 5: Parallel Run & Cutover (Week 9–12)

- Run Retool and new app in parallel for at least 2 weeks
- Switch teams page-by-page, not all at once
- Trigger forced password reset for built-in Retool users on new platform
- Update SSO provider redirect URLs to new domain
- Decommission Retool subscription after all teams confirm parity

## Cost paths

| Path | Cost | Timeline | Fits |
| --- | --- | --- | --- |
| DIY (with AI tools) | $0–500 + your time | 4–6 months part-time | Founders or developers who can read the Retool JSON export and translate it to React/Next.js; works best for simple apps with 3–5 pages and limited query complexity |
| Freelancer | $5K–12K | 6–10 weeks | Apps with moderate complexity (10–20 pages, SQL queries, basic workflows); freelancer needs solid Next.js + Supabase experience and ability to read Retool JSON exports |
| Agency (RapidDev) | $13K–25K fixed price | 6–10 weeks | Internal apps with 10–40 pages, complex SQL queries, workflows, SSO, and audit log requirements; teams that need guaranteed parity and a managed cutover |

## Risks and mitigations

- **Query logic loss** — Retool SQL/JS queries embedded in component props are easy to miss in a surface-level JSON review. Run a systematic export audit, component by component, before writing replacement code.
- **Auth disruption** — Built-in Retool users will need a forced password reset on the new platform. SSO users need redirect URL updates at the identity provider. Audit which user type each person is before cutover.
- **Feature-parity trap** — Retool has 100+ built-in connectors that take weeks to replicate. Prioritize the 20% of connectors used 80% of the time; build the rest on demand post-launch rather than blocking cutover.
- **Workflow and Agent rebuild** — Retool Workflows and AI Agents have no portable format — each must be rebuilt as an Edge Function or Server Action. Document every trigger, action, and schedule from the Workflows UI before starting.
- **Self-hosted Retool 4.0 migration debt** — If already self-hosted, upgrading to Retool 4.0 requires Docker Compose/ECS → Kubernetes/Helm migration before exit. Factor this pre-migration cost into your timeline and budget.

## Stay or go

Stay if:

- Your team is 10 users or fewer and per-seat cost is under the amortized cost of 1 engineer's time to maintain a custom stack
- You need rapid internal tooling iteration and have no custom UI requirements — Retool's 100+ connectors and drag-drop builder beats months of engineering for simple ops tools
- You're on Enterprise with self-hosting, SSO, and audit logs fully configured and compliance requires an established vendor

Go if:

- Standard-user headcount × $65/mo is approaching or exceeding the cost of 1–2 engineers at 12-month projected headcount
- You need customer-facing polish or custom UI beyond what Retool's component set allows
- Self-host re-gating to Enterprise tier has changed your cost model and you can't justify the Enterprise contract

Retool is excellent for internal tooling at small scale. The migration trigger is almost always economic — model per-user cost at 12-month projected headcount before making the call.

## Migration checklist

- Export all app JSON via Retool Settings → Export — This is your migration spec — every query, component, and workflow lives in this file
- Inventory every resource: document name, type, connection string, and auth method — Resources are the connective tissue of your Retool apps; missing one causes silent failures in the rebuild
- Screenshot every page and every query output — Screenshots serve as your parity test spec when there is no source code to diff against
- Audit which users are on built-in auth vs SSO — SSO users migrate cleanly; built-in users need a forced password reset flow planned in advance
- Export Retool Database data if used (pg_dump from the Neon Postgres instance) — Retool Database is the one case where data lives in Retool's infrastructure rather than your own
- Document all scheduled workflow triggers and their cadence — Retool Workflows have no portable format; the cadence and logic must be reconstructed from documentation
- Validate that your data sources are accessible outside Retool before writing a line of code — Confirms that migration is unblocked — occasionally connection strings have hardcoded Retool-network assumptions

## Frequently asked questions

### Can I export my Retool app as source code?

No. Retool apps export as JSON configuration files via Settings → Export. This JSON is readable and useful as a migration spec, but it runs only inside the Retool runtime (cloud or self-hosted Docker). There is no source-code eject — exit means a rebuild.

### What data can I take with me when leaving Retool?

All of it. Retool is a query layer — it connects to your own databases (Postgres, MySQL, REST APIs) and does not store your source data. If you used Retool Database, that is Postgres via Neon and exports via standard pg_dump. Your data has always been yours.

### How long does a Retool migration take?

Typically 8–12 weeks for a full rebuild. Simple apps (3–5 pages, basic SQL queries) can be done in 6–8 weeks. Complex apps with 20+ pages, custom workflows, AI Agents, and SSO requirements can reach 12 weeks. The largest time sink is auditing SQL/JS logic embedded in Retool component props.

### What happens to my users and their passwords when I migrate?

SSO users (SAML/OIDC via Okta, Azure AD, etc.) are managed by your identity provider — they migrate cleanly with a redirect URL update at the IdP. Users on Retool's built-in email/password auth will need a forced password reset on the new platform; password hash export is not documented.

### Is Retool self-hosting still available?

As of Feb 2026, self-hosting is effectively Enterprise-tier only. A community forum thread (community.retool.com/t/self-hosted-docs-now-state-enterprise-only/64586) confirmed this change, which reverses Retool's earlier open self-host position. If you relied on self-hosting on a Team or Business tier plan, your cost model has changed.

### What about Retool's AI Agents and AppGen features?

AI Agent definitions are included in the JSON export and are readable as a spec. However, the runtime logic is tied to Retool's proprietary infrastructure and must be rebuilt as server-side AI SDK integrations (Anthropic or OpenAI via Next.js Route Handlers). The longer you build with AppGen, the more runtime dependencies accumulate.

### How much does a Retool migration cost?

DIY with AI tools: $0–500 plus your time (4–6 months part-time, works for simple apps). Freelancer: $5K–12K over 6–10 weeks. Agency with a fixed-price guarantee: $13K–25K over 6–10 weeks. RapidDev offers fixed-price Retool migrations with a free scoping call at rapidevelopers.com — book one before committing to any approach.

### Is it worth migrating if Retool is still active and growing?

It depends entirely on economics. Run this calculation: (current users + 12-month projected new users) × $65/mo × 12 months vs. a one-time migration cost. Many teams find the crossover happens between 15–25 users. If you're well below that threshold, Retool's speed advantage likely outweighs the migration cost.

---

Source: https://www.rapidevelopers.com/no-code-to-code/how-to-migrate-retool-project-to-code
© RapidDev — https://www.rapidevelopers.com/no-code-to-code/how-to-migrate-retool-project-to-code
