Building a link
To build a link, use the format below.URL parameters
Make sure to include the following parameters in your URL.| Parameter | Type | Description | Required/Optional |
|---|---|---|---|
stack | string | The build mode to use. Must be either Design or Build. Design opens Design Mode for visual prototyping. Build opens Agent for full app development. | Required |
prompt | string | Text describing the application to build, compressed using LZ-string. The uncompressed prompt can be up to 50,000 characters. | Required |
referrer | string | The name or URL of the page containing this link. Used for attribution. | Optional |
The
prompt parameter must be compressed using LZ-string compression before
being added to the URL. This helps URLs remain within browser length limits
and parse correctly.Interactive link builder
Use the tool below to generate your Open in Replit link. Enter your prompt, select the stack mode, and the link will be generated automatically with LZ-string compression applied.The name or URL of the page containing this link. Used for attribution.
https://replit.com/?stack=Design&prompt=[](https://replit.com/?stack=Design&prompt=)Compressing prompts
To create a valid Open in Replit link, you must compress your prompt using LZ-string compression. Here’s how:JavaScript/TypeScript
Python
Examples
Design Mode with basic promptStack modes
Design Mode
Usestack=Design to open your prompt in Design Mode, which is optimized for:
- Visual design and UI prototyping
- Rapid iteration on layouts and styling
- Creating design mockups
- Frontend-focused development
Build Mode
Usestack=Build to open your prompt in Agent, which is optimized for:
- Full-stack application development
- Backend logic and APIs
- Database integration
- Complex functionality and features
Best practices
- Keep prompts concise and focused on core features for best generation results.
- Use clear, descriptive language that explains what you want to build.
- Choose the appropriate
stackmode for your use case (Design for UI/UX, Build for full apps). - Test your compressed URLs to ensure they parse correctly before sharing.
- Consider your audience’s technical level when crafting prompts.
User authentication
Regardless of your Replit authentication state, you’ll need to provide input before creating the app. Usually this means submitting the prompt.Error handling
If the URL is malformed or parameters are invalid, Replit won’t fill the prompt. Possible causes include:- Missing required parameters (
stackorprompt) - Invalid
stackvalue (must beDesignorBuild) - Failed decompression of the
promptparameter - Browser “URL too long” errors (though compression helps mitigate this)
Security considerations
When sharing Open in Replit links:- Review prompts carefully before sharing publicly
- Consider the security implications of the apps being generated
- Avoid including sensitive information in prompts
- Be transparent about what the link will create