Connect MetaMask to dApps: WalletConnect, Injected Provider & In-App Browser

Try Tangem secure wallet →

Table of contents


Overview: three ways to connect MetaMask to a dApp

There are three common flows for connecting MetaMask to decentralized applications (dApps): the injected provider (browser extension injection), WalletConnect (QR/deep-link session), and the mobile in-app browser. Each method uses the same keys under the hood (your private keys and accounts), but the UX, security surface, and failure modes differ. I use all three depending on the device and task. Which one fits your routine?

Short answer: use the injected provider for desktop browser dApps, WalletConnect when bridging desktop dApps to your phone, and the in-app browser for quick mobile visits. And yes, switching networks (Ethereum vs BSC vs L2s) is part of the process — see the network section below.

For basic setup see: install MetaMask Chrome extension and MetaMask mobile (iOS/Android).


Quick checks — how to check if MetaMask is connected

Want to check if MetaMask is connected? Here are fast ways (user and developer):

window.ethereum && window.ethereum.request({ method: 'eth_accounts' }).then(a=>console.log(a))

If you see an address, the dApp has access. If the array is empty, the dApp is not connected. This answers the query "check if metamask is connected" directly.


Step-by-step: how to connect MetaMask to Uniswap (desktop, injected provider)

If you searched for "how to connect metamask to uniswap" here's a concise step-by-step:

  1. Open your browser with the MetaMask extension installed (browser extension setup).
  2. Go to the Uniswap dApp URL in your browser (or the dApp you want).
  3. Click the site’s "Connect Wallet" button and choose MetaMask if prompted.
  4. The MetaMask popup appears: review the requested account(s) and click "Next", then "Connect".
  5. Confirm the network shown in MetaMask matches the dApp (Ethereum Mainnet for Uniswap). If not, switch networks in the extension.

If the popup doesn't appear, try unlocking MetaMask first and reloading the page. But don't blindly click "Connect" on unknown sites.

For wallet safety and transaction flow details see using dApps and token approvals and revoke.


Step-by-step: connect MetaMask to Binance Smart Chain (add BSC then connect)

If you need to connect MetaMask to Binance Smart Chain (BSC), follow these steps:

  1. Add BSC as a custom RPC in MetaMask (chain ID, RPC URL, symbol). See the guided page: add-bsc-to-metamask.
  2. Switch the active network in MetaMask to BSC.
  3. Open the BSC dApp you want to use and click "Connect Wallet" — select MetaMask.
  4. Approve the connection in the MetaMask popup.

Note: BSC uses BEP-20 tokens (compatible with ERC-20 interface). Always confirm you are on the intended network before approving swaps or contract interactions.


Use WalletConnect with MetaMask (mobile scan & deep link)

WalletConnect allows a desktop dApp to ask your phone-based wallet (MetaMask mobile) to connect via a QR code or deep link. This avoids installing the extension on desktop.

How to connect (typical flow):

  1. On the dApp, choose "WalletConnect" as the wallet option.
  2. A QR code appears (desktop) or a deep link is offered (mobile).
  3. Open MetaMask mobile, go to the QR scanner (or tap the link), scan the code or accept the deep link.
  4. In MetaMask mobile approve the session and choose the account to expose.

To end a session: open MetaMask mobile → WalletConnect → terminate the session. If a session is stuck, open MetaMask and explicitly disconnect the dApp (or clear local site data in your browser).

For full WalletConnect explanation see walletconnect-guide.


In-app browser (MetaMask mobile): when to use it and how to connect

MetaMask mobile contains a built-in browser that injects the provider directly into the page. This makes connection frictionless: open the dApp inside the app, tap "Connect", and approve.

Pros: fast, fewer steps, good for quick swaps or staking. Cons: you lose the external browser's extensions and may see more tracking from the dApp (use private mode if needed). I use the in-app browser when I'm on-the-go.

See metamask-mobile-ios-android for setup tips.


Comparison table: injected vs WalletConnect vs in-app browser

Method Typical devices Typical UX Network switching Disconnect control Security notes
Injected provider (extension) Desktop browsers Click connect → popup Manual in extension MetaMask: Connected sites → disconnect Good for desktop, beware rogue tabs
WalletConnect Phone + desktop Scan QR or deep link Change in wallet app WalletConnect sessions → end in app Useful for mobile-only wallets, check session scope
In-app browser MetaMask mobile Direct injection, one-tap connect Change network in mobile Disconnect from app or site Fast, but keep mobile security posture (screen locks)


Troubleshooting common errors and stuck sessions

I once left an unlimited token allowance open and had to revoke it — learned the hard way. But you can revoke allowances; see token-allowances-and-revoke.


Security tips when approving connections

For deeper checks see security-checklist and phishing-address-poisoning.


Who should use each connection method


FAQ

Q: How do I accept connection request in MetaMask? A: Look for the MetaMask popup (extension or mobile). Review the accounts requested, click "Next", then "Connect". If the popup disappears, unlock the app and reload the dApp.

Q: What if a wallet connection request is already pending MetaMask? A: Close the dApp modal, check MetaMask for the pending approval, accept or reject it. If you can't find it, disconnect the site in Connected Sites and try again.

Q: How can I clear MetaMask SDK connections? A: End WalletConnect sessions in the app and remove connected sites in MetaMask's settings. Clearing site storage in the browser helps with persistent SDK state.

Q: Is it safe to keep crypto in a hot wallet? A: Hot wallets are convenient for DeFi but carry increased exposure. Keep large holdings offline (hardware wallets) and use hot wallets for active trading and dApp interactions.


Conclusion & next steps

Connecting MetaMask to dApps can be simple — once you understand the differences between the injected provider, WalletConnect, and the in-app browser. I recommend testing each flow with a small transaction first. In my experience the small test saves time and gas later.

Next steps: if you need a refresher on installing or restoring your wallet, see install-create-wallet and seed-phrase-backup-recovery. For troubleshooting connection-related transaction errors, see transaction-errors-and-fixes.

Want to learn more about WalletConnect sessions, network setup, or how to revoke approvals? Check walletconnect-guide, add-bsc-to-metamask, and token-allowances-and-revoke.

But above all: test with small amounts and keep backups of your seed phrase.

Try Tangem secure wallet →