Skip to main content
Open in Replit

Clicking this badge automatically opens Replit and populates the prompt and settings.

To build a link, use the format below.

URL parameters

Make sure to include the following parameters in your URL.
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.
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.

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

Use compressToEncodedURIComponent to ensure the compressed string is URL-safe.

Examples

Canvas with basic prompt
Build Mode with detailed prompt

Stack modes

Canvas

Use stack=Design to open your prompt in Canvas, which is optimized for:
  • Visual design and UI prototyping
  • Rapid iteration on layouts and styling
  • Creating design mockups
  • Frontend-focused development

Build Mode

Use stack=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 stack mode 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 (stack or prompt)
  • Invalid stack value (must be Design or Build)
  • Failed decompression of the prompt parameter
  • Browser “URL too long” errors (though compression helps mitigate this)

Security considerations

Open in Replit links could be used to create apps with unintended behavior or security vulnerabilities. Only click links from trusted sources.
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