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

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
Airwallex

Airwallex

Connect Airwallex to Webflow to process payments through hosted checkout pages and sync transaction data to your CMS collections

Payment processing
Learn more
Paystack

Paystack

Paystack is a payment processing platform serving African markets with support for multiple payment channels including cards (Visa, Mastercard, Verve, American Express), bank transfers, mobile money, USSD, QR codes, and Apple Pay.

Payment processing
Learn more
Stripe Webflow integration

Stripe Webflow integration

Connect Stripe's powerful payment infrastructure with Webflow to accept payments, manage subscriptions, and scale your business globally. Process transactions in 135+ currencies with built-in fraud protection while maintaining complete design control over your checkout experience.

Payment processing
Learn more
Square

Square

Connect Square's powerful payment processing and point-of-sale system with Webflow to create seamless e-commerce experiences. Accept payments, sync inventory, manage appointments, and unify your online and offline sales channels while maintaining complete design control.

Payment processing
Learn more
Paypal Payments

Paypal Payments

Connect PayPal's global payment infrastructure with Webflow to accept payments in 119 countries, enable one-click checkout, and support multiple payment methods. Expand your business reach while maintaining complete design control over the checkout experience.

Payment processing
Learn more
KOMOJU

KOMOJU

Accept payments in Japan and Korea with KOMOJU's localized payment methods on your Webflow site. Enable convenience store payments, bank transfers, and regional e-wallets to boost conversions in East Asian markets.

Payment processing
Learn more
Donately

Donately

Connect Donately's fundraising platform with Webflow to streamline your online donation process. Embed customizable forms, track campaigns, and manage donors while maintaining complete design control over your fundraising pages.

Payment processing
Learn more
Authorize.net

Authorize.net

Connect Authorize.net with Webflow to accept credit cards, e-checks, and payments through embedded forms or API integration.

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