Test a local site on your phone over HTTPS
Free during the beta with a registered account and an API key.
Get a tunnel URLDevice mode in devtools gets the screen size right and not much else. It won't show you how mobile Safari treats your sticky header, or what the camera permission prompt looks like on an actual phone. For that you need the site open on a real device. The quickest way to get it there is a tunnel. You run one command next to your dev server, it gives you a public https URL, and you open that URL on the phone.
1. Start the dev server and the tunnel
Start your app the way you normally would. The examples here assume port 3000. You'll need an API key, which you can create on your account page. Then run this in a second terminal.
(curl -fsSL https://revsheller.com/tn.sh || wget -qO- https://revsheller.com/tn.sh) | RSH_API_KEY=rsh_YOUR_KEY sh -s -- http 3000
On Windows PowerShell it's this instead.
$env:RSH_API_KEY="rsh_YOUR_KEY"; & ([scriptblock]::Create((irm https://revsheller.com/tn.ps1))) http 3000
There's a cmd version too, at https://revsheller.com/tn.cmd. The script downloads a small native client for your OS and checks it against a pinned SHA-256 before running it, so there's nothing to install beforehand. Once it connects, it prints a URL like https://tn-k3v9q2m7xa.revshell.org.
2. Open it on the phone
Getting the URL onto the phone is the fiddly part. Messaging it to yourself works, and so does pasting it into a QR code generator and scanning that. The phone doesn't need to be on the same Wi-Fi as your laptop. Mobile data is fine, since the URL is public.
The first page load in each browser shows a short warning page with the tunnel's hostname on it. Tap Continue and that browser won't see it again for this tunnel for 7 days. API calls and webhooks never get the warning page, only page loads in a browser.
What to check on a real device
Most of what goes wrong on phones is layout and input. Hover-only menus can't be opened, small tap targets get missed, and the on-screen keyboard can cover the very input you just focused. Viewport units like 100vh misbehave too, because the browser toolbar shrinks and grows as you scroll.
Then there's the engine. Every browser on an iPhone runs on WebKit, Chrome included, so if you only ever develop in desktop Chrome you haven't seen your site the way iPhone users do. Check Chrome on Android as well.
It's also worth loading the page over mobile data on an ordinary phone. A heavy bundle or oversized images that you'd never notice on a laptop with fast internet are hard to miss there.
Features that need HTTPS
Some browser APIs only work in a secure context, and a phone won't treat http://192.168.x.x as one. The tunnel URL is https, so you can test service workers (and whether the app installs as a PWA), geolocation, camera and microphone access through getUserMedia, and navigator.clipboard. Cookies marked Secure and SameSite rules also behave the way they will in production.
Your dev server can keep serving plain http. The https part is handled on our side, before requests reach your machine.
Why not just use your laptop's IP?
The usual alternative is to type your laptop's local address into the phone. Even when that works, you're on plain http, so none of the APIs above are available. And often it doesn't work at all. Vite and webpack-dev-server only listen on localhost by default, so you'd have to add --host or host: "0.0.0.0". Your firewall may block the port. Guest, office and campus Wi-Fi usually keep devices from reaching each other.
A tunnel doesn't run into any of this, because the client opens an outbound connection from your machine and requests come back over it. It connects to 127.0.0.1 and sends Host: localhost:<port>, so you don't need --host either.
Sharing with a colleague
Anyone you send the URL to sees your local build, live. That's handy when a designer or teammate wants a quick look. It also means anyone who gets hold of the link can open it. The random name isn't access control, so keep anything private behind your app's own login. Tunnel hosts send noindex, which asks search engines to leave them out.
Troubleshooting
- If the page loads but hot reload never connects, the HMR client is probably still pointed at
localhost. WebSocket upgrades go through the tunnel, so check your dev server's HMR host and port settings. - If links or redirects point at localhost, your app is probably building URLs from the Host header. Run the client with
--host-header preserveand add the tunnel hostname to your dev server's allowed hosts. The public hostname is also sent inX-Forwarded-Host. - If your server isn't listening on 127.0.0.1, pass
--hostto the client, for example--host localhost.
When you're finished, press Ctrl-C. The client deletes the tunnel and the URL stops working straight away.
Limits during the beta
You can run 2 tunnels at a time, with 10 GiB of traffic a month between them. Each tunnel lasts up to 8 hours and takes up to 600 requests a minute, 100 of them at once, with request bodies up to 25 MB. The planned limits for each plan are on the pricing page.
FAQ
Why won't my phone load my laptop's local IP?
Usually the dev server only listens on localhost, the firewall is blocking the port, or the Wi-Fi keeps devices apart. The tunnel doesn't depend on any of that, because the connection goes out from your laptop.
Do I need to run Vite or webpack with --host?
No. The tunnel client connects to 127.0.0.1 and sends Host: localhost:<port>, so a server that only listens on localhost works.
Will the phone show a warning page?
The first time each browser opens the tunnel, yes. After you tap Continue it won't appear again in that browser for 7 days.
Does the phone need to be on the same Wi-Fi?
No, mobile data works too. The URL is public.
See also sharing a dev server, tunnel basics and limits, and the tunnel docs.
Get a tunnel URL