Free App Deep Link Generator
Create smart routing scripts that detect user OS and redirect to the correct app store or native app - with a web fallback URL.
Define your App schemes and Store URLs to generate a dynamic cross-platform routing script.
What Is an App Deep Link?
A deep link is a URL that opens a specific location inside a native mobile app rather than navigating to a web page. Deep links use custom URI schemes (like twitter://, spotify://, or myapp://profile/123) that the mobile operating system recognizes and routes to the registered app.
However, publishing a raw custom URI scheme on a web page is unreliable: if the user does not have your app installed, the browser shows an ugly "Cannot open page" error. You also cannot use a single app URI scheme to handle both iOS and Android, since users come from both platforms.
How the Smart Router Snippet Works
This tool generates a "deferred deep link" routing script. Here is what happens when a visitor lands on the page containing this snippet:
- The script detects the user's device via the
navigator.userAgentstring. - If on iOS or Android and an app scheme is provided, it immediately attempts
window.location.href = appSchemeto open the native app. - Simultaneously, a 1.5-second background timer starts as a fallback.
- If the app opens successfully, the browser tab goes hidden - the script detects the
visibilitychangeevent and clears the timer. No redirect happens. - If the app is not installed, the timeout fires and redirects the user to the correct App Store (iOS → Apple App Store, Android → Google Play) or web fallback URL.
- Desktop users are sent directly to the web fallback without attempting the app scheme.
Best Use Cases for Deep Link Routing
- Email Campaigns: Send "Open in App" links in email that route to the correct store if the app is not installed.
- SMS and Push Marketing: Re-engage lapsed users with a click that opens a specific in-app screen (product page, promo, user profile).
- QR Code App Downloads: Print a single QR code that routes iOS users to the App Store and Android users to Google Play automatically.
- Web-to-App Conversion: Convert web visitors to app users by offering a smart "Download Our App" link that routes seamlessly.
Frequently Asked Questions
Where do I find my app's custom URI scheme?
For iOS apps, the URI scheme is defined in your app's Info.plist under URL Types. For Android, it is defined in your AndroidManifest.xml in an intent filter with an android:scheme attribute. If building a React Native or Flutter app, check your linking configuration file. Example formats: myapp://, com.mycompany.myapp://.
Why does the 1.5-second timeout sometimes redirect even when the app is installed?
On some devices and browsers, the visibilitychange event fires inconsistently or with a slight delay when switching to the native app. If you experience false fallbacks, increase the timeout value in the generated code from 1500 to 2500 milliseconds. Conversely, users on slower devices may see a noticeable delay before the fallback fires.
Will this work with iOS Universal Links or Android App Links?
No. This script uses custom URI schemes, which is the simpler, more universally supported method. Universal Links (iOS) and App Links (Android) are more robust standards that require an associated-domain file on your server - they are the preferred solution for production apps. Use this script for quick prototyping, QR codes, and campaigns where setting up Universal Link hosting is not practical.
Developer tools delivered free
Deep link guides, Open Graph tips, and new dev tools - straight to your inbox.
Related Tools
Explore other free tools to build, test, and optimize your links and QR codes.
Barcode (1D)
Generate, preview, and download 1D barcodes (Code128, EAN-13, UPC, etc.) instantly in your browser.
GA4 Cross-Domain Tracker
Generate Google Analytics 4 (GA4) cross-domain tracking code snippets to maintain user sessions across multiple websites.
HTML Link
Generate clean, perfectly formatted HTML anchor tags with custom rel, target, class, and ID attributes.
Open Graph Meta Tag
Generate the perfect Open Graph and Twitter Card HTML meta tags for social media link sharing optimization.
Amazon Affiliate Link Builder
Clean up messy Amazon URLs and generate perfect Associate links using your affiliate tag.
Link Expirator & Countdown Snippet
Generate a Javascript snippet to automatically expire a link and redirect traffic after a specific date and time.