If you've ever needed to share a local project with a colleague or client, you've probably come across both ngrok and prev. While they can look similar on the surface — both give you a public URL — they solve fundamentally different problems. This article breaks down when to use which.

What ngrok Does

ngrok creates secure tunnels from the public internet to your local machine. When you run ngrok http 3000, it exposes your localhost port through a temporary public URL. Your app keeps running on your computer; ngrok simply routes external traffic to it.

ngrok Strengths

  • Instant tunneling: Expose any local port to the internet in seconds
  • Webhook development: Test third-party callbacks (Stripe, GitHub, etc.) against your local server
  • No deployment needed: Your code stays on your machine, running in your local environment
  • Traffic inspection: Built-in request/response inspector for debugging

ngrok Limitations

  • Your machine must stay on: Close the laptop, and the tunnel dies — along with anyone's ability to view it
  • Network-dependent: Performance depends on your local internet connection
  • Single user: Only practical for sharing your own machine's work
  • No isolated environments: Everyone who accesses the URL hits your exact local state, including any debug breakpoints or half-finished code

What prev Does

prev creates a hosted, short-lived review environment that works until the environment expires. When you run prev create . --feedback, it packages your source code, builds it in the cloud, serves it from dedicated infrastructure, and adds the review workflow around the running app.

prev Strengths

  • Truly independent: Review environments run on cloud infrastructure, so your machine can be off
  • Consistent URLs: Each review gets a stable URL like cosmic-falcon.preview.prev.sh
  • Isolated environments: Every review environment is a separate container with its own state
  • Review workflow: Collect feedback, approvals, and follow-up context in the environment instead of scattered chats and screenshots
  • Team-friendly: Review environments can be shared with QA, clients, stakeholders, and demo viewers, no local setup required
  • CI/CD integration: Automate review environment creation for every pull request

prev Limitations

  • Requires deployment: Code is uploaded and built in the cloud (typically under 30 seconds)
  • Not for local debugging: Designed for sharing and review, not for inspecting requests hitting your local server

Side-by-Side Comparison

Featureprevngrok
How it worksCreates hosted review environmentsTunnels to your localhost
URL lifetimeConfigurable TTL (hours to days)Session-based (dies when you stop it)
Requires local server runningNoYes
Works offlineYes (after deploy)No
Review workflowContext, feedback, approvals, ownership, expiry, and cleanupNo; it exposes local traffic
CI/CD integrationBuilt-inNot designed for it
Use caseQA checks, client approvals, stakeholder reviews, launch checks, and demosExpose local dev server temporarily
Supported projectsSelf-contained web apps and Docker imagesAnything running on a local port

When to Use ngrok

ngrok is the right choice when you need to:

  • Test webhooks locally: Receive Stripe payment callbacks, GitHub webhooks, or Slack events on your development machine
  • Quick demo from your laptop: Show something to a colleague for a few minutes while you're both online
  • Debug incoming requests: Use ngrok's built-in inspector to examine request payloads
  • Develop with third-party APIs: Many APIs require a public callback URL during development

When to Use prev

prev is the right choice when you need to:

  • Run QA, client, or stakeholder reviews: Reviewers can work on their own time without depending on your machine being on
  • Create PR-based review environments: Automatically deploy a review environment for every pull request in CI/CD
  • Replace staging review bottlenecks: Ephemeral review environments spin up on demand instead of routing every review through shared staging
  • Keep feedback connected: Context, comments, approvals, and follow-up work stay tied to the review environment
  • Persist beyond your session: Reviews stay live for hours or days, regardless of your local setup

Can You Use Both?

Absolutely. Many developers use ngrok during active local development — especially for webhook testing — and prev when it's time to share work with others. They complement each other:

  • Develop locally with ngrok for webhook testing
  • Push your branch and let CI/CD create a prev review environment
  • Share the prev review link with your team, client, or QA
  • Conclusion

    ngrok and prev are not competitors; they are tools for different stages of the development workflow. ngrok bridges your local machine to the internet for development and debugging. prev creates hosted review environments for QA checks, client approvals, stakeholder reviews, launch checks, and demos.

    If you're looking for a review workflow that does not depend on your laptop staying open, start a 7-day trial.