Metamask

Connect MetaMask with Webflow to add wallet authentication, NFT galleries, and token-gated content.

Install app
View website
View lesson
A record settings
CNAME record settings
Metamask

How to integrate MetaMask with Webflow

Web3 functionality enables wallet-connected experiences like NFT galleries, token-gated content, and blockchain authentication. All MetaMask integrations require custom code.

The integrations include Web3Modal via CDN for the fastest setup and multi-wallet compatibility. Pre-built GitHub widgets work for specific use cases but require ongoing maintenance. MetaMask SDK provides official mobile support for complex interactions.

Use Web3Modal via CDN

Web3Modal provides CDN-based integration within the Webflow custom code constraints.

The features include the following:

  • CDN integration with no build tools
  • Wallet data display (addresses, ETH balances) via Ethers.js
  • Session persistence with cacheProvider: true
  • Light/dark theme customization

Place Ethers.js and Web3Modal CDN links in custom code in the head and body tags. Use defer attributes for external libraries and initialize within DOMContentLoaded. Test on the staging domain, as the custom code only works on published sites with HTTPS.

Use pre-built GitHub widgets

GitHub widgets like MetaMask button, Webflow, and Webflow NFT components provide functional connections without writing Web3 code from scratch.

Note: Most Web3 GitHub projects have inconsistent maintenance. Pin specific versions and test thoroughly before production.

The widget functionality includes the following:

  • MetaMask connection via Ethers.js with automatic wallet detection
  • NFT minting through smart contract integration
  • Multi-chain support: Ethereum, Polygon, Arbitrum, Optimism, Base, BNB Chain

Create button elements with HTML IDs, add widget scripts to Before body tag section, and configure variables (CONTRACTADDRESS, ISTESTNET, MAXPERMINT). Test on testnets (Goerli/Sepolia) before mainnet.

Use MetaMask SDK

MetaMask SDK provides official desktop/mobile wallet support through a unified API — best for mobile support or complex wallet interactions.

SDK capabilities:

  • Mobile wallet connection via deep linking
  • Session persistence across refreshes
  • Automatic desktop/mobile detection
  • dappMetadata configuration for site identification

Install via CDN in custom code, initialize with dApp metadata, verify connection with eth_accounts, and implement error handling. Mobile integration triggers deep links to MetaMask app for approval.

Display NFT galleries

Query blockchain data through Alchemy, Infura, or QuickNode using REST APIs or JSON-RPC endpoints. Fetch NFT data after wallet connection, then dynamically create HTML elements.

API calls take 5-30 seconds. Implement loading states and error handling.

Example using Alchemy:

const ALCHEMY_API_KEY = "YOUR_API_KEY";
const walletAddress = "0x...";

fetch(`https://eth-mainnet.g.alchemy.com/nft/v3/${ALCHEMY_API_KEY}/getNFTsForOwner?owner=${walletAddress}`)
  .then(res => res.json())
  .then(data => {
    data.ownedNfts.forEach(nft => {
      const img = document.createElement('img');
      img.src = nft.media[0].gateway;
      img.alt = nft.title;
      document.getElementById('nft-gallery').appendChild(img);
    });
  })
  .catch(error => console.error('Failed to fetch NFTs:', error));

What you can build

Web3 integrations with Webflow help build blockchain-enabled site features. All implementations require custom code:

  • NFT minting platforms: Wallet connection + direct minting. Requires smart contracts, gas handling, and supply tracking.
  • Token-gated membership sites: Access restricted to NFT/token holders. Server-side verification required.
  • DeFi landing pages: Wallet connection + balance display. Smart contract interaction requires development expertise.
  • Web3 authentication systems: Wallet-based login via cryptographic signatures. Requires backend setup.

Frequently asked questions

  • Standard mobile browsers (Safari, Chrome) cannot use MetaMask's browser extension. Mobile integration requires deep linking and MetaMask SDK.

    Solutions:

    • MetaMask SDK: Direct mobile integration via deep linking
    • WalletConnect: Broader wallet support via QR codes/universal links

    MetaMask SDK auto-detects mobile environments and triggers deep links. Users should use MetaMask mobile app's built-in browser for optimal integration.

  • Webflow enforces 50,000-character maximum per custom code section. Web3.js and Ethers.js require CDN references rather than inline embedding.

    CSP configuration: Enterprise customers only via Webflow security headers. Others can use Cloudflare or reverse proxies.

    Scripts load synchronously by default. Use defer attributes and wrap initialization in window.addEventListener('load', …). Include .webflow.io and .canvas.webflow.com domains for preview environments.

  • Built-in support: Ethereum, Optimism, Base, BNB Chain, Polygon, Arbitrum.

    Switch networks via wallet_switchEthereumChain. Error 4902 indicates wallet_addEthereumChain needed first.

    Chain IDs:

    • Ethereum Mainnet: 0x1
    • Polygon: 0x89
    • Arbitrum One: 0xa4b1
    • Optimism: 0xa
    • Base: 0x2105
    • BNB Chain: 0x38
  • Detect MetaMask using the EIP-6963 standard (eip6963:announceProvider event listener) instead of the deprecated window.ethereum method. For users on browsers that don't support EIP-6963, display upgrade prompts.

    The EIP-1193 specification defines the Ethereum Provider standard that MetaMask implements. This specification enables wallet integration with websites through the standardized window.ethereum JavaScript API.

    Mobile browser behavior differs from desktop extensions. The MetaMask mobile security report highlights critical differences in mobile implementations compared to desktop browser extensions. MetaMask's documentation notes that mobile implementations differ substantially from desktop browser extensions in their architecture and user experience, with mobile wallet interactions requiring different integration approaches than desktop extension-based flows.

Metamask
Metamask
Joined in

Description

MetaMask is a cryptocurrency wallet and Web3 gateway for blockchain applications. It supports Ethereum, Polygon, Arbitrum, Optimism, Base, and BNB Chain. Users can connect to dApps, sign transactions, and manage digital assets from browser or mobile.

Install app

This integration page is provided for informational and convenience purposes only.


Other Payment processing integrations

Other Payment processing integrations

Form Payments

Form Payments

Connect Form Payments, a payment collection app, with Webflow to accept payments through native forms without building e-commerce infrastructure or redirecting users to external checkout pages.

Payment processing
Learn more
QuickBooks

QuickBooks

Connect QuickBooks with Webflow to automate the invoice creation from orders, sync customer records from forms, and record transactions without manual data entry.

Payment processing
Learn more
Revolut for Business

Revolut for Business

Connect Revolut for Business to Webflow and accept multi-currency payments without rebuilding your site on another platform.

Payment processing
Learn more
Xero

Xero

Connect Xero to Webflow and sync ecommerce orders with accounting records without manual data entry.

Payment processing
Learn more
Mollie

Mollie

Connect Mollie, a European payment service provider, with Webflow to accept 25+ payment methods including iDEAL, Bancontact, and Klarna. This integration works exclusively for companies registered in the EEA, Switzerland, or the United Kingdom.

Payment processing
Learn more
GoCardless

GoCardless

Connect GoCardless with Webflow to collect recurring Direct Debit payments without backend development.

Payment processing
Learn more
Razorpay

Razorpay

Connect Razorpay with Webflow to accept Indian payment methods like UPI and netbanking.

Payment processing
Learn more
Lemon Squeezy

Lemon Squeezy

Connect Lemon Squeezy with Webflow to add payment processing and subscription management through checkout overlays, direct payment links, or API integrations.

Payment processing
Learn more
Monto Simple Subscriptions

Monto Simple Subscriptions

Connect Monto Simple Subscriptions with Webflow to add recurring billing to your ecommerce store products.

Payment processing
Learn more

Related integrations

No items found.

Get started for free

Try Webflow for as long as you like with our free Starter plan. Purchase a paid Site plan to publish, host, and unlock additional features.

Get started — it’s free