Max SchmittMS
28th March 2021

How to open a localhost website on iPhone / iOS

If you're doing any kind of web development work these days, you probably need your website or app to run on mobile phones.

By default, your iPhone or iPad won't be able to access an app that's running on localhost on your desktop (unless you're running the simulator).

If both your computer and your phone are in the same network however, you can take your phone and navigate to the local IP address of your computer.

Step 1: Get IP Friend for macOS (Free)

Go the Mac App Store and download IP Friend. Then, go ahead and open the app.

Step 2: Copy Your IP Address

Click the "IP" icon in your menubar to copy your IP address.

Screenshot of IP Friend running as a macOS menu bar application

If you have your localhost address in your clipboard (e.g. http://localhost:3000), you can hold down Option ⌥ with the IP menu open to replace the "localhost" part with your IP. http://localhost:3000 then becomes something like

Step 3: Paste the Address on Your Phone

macOS and iOS share a clipboard thanks to iCloud Clipboard, so you can now simply paste the IP address in Safari's address bar on your iPhone. Don't forget to add http:// and the port if necessary!

Video Walkthrough

Watch the following video to see how easy it is to open localhost website with IP Friend:

Image of my head

About the author

Hi, I’m Max! I'm a fullstack JavaScript developer living in Berlin.

When I’m not working on one of my personal projects, writing blog posts or making YouTube videos, I help my clients bring their ideas to life as a freelance web developer.

If you need help on a project, please reach out and let's work together.

To stay updated with new blog posts, follow me on Twitter or subscribe to my RSS feed.