# Connect to GetBlock with MetaMask

> Learn how to set up custom RPC URL on MetaMask for faster, more reliable, and secure blockchain interactions.

MetaMask is a blockchain wallet available as a mobile application and a browser extension. It allows you to interact with Ethereum-based decentralized applications (dApps) directly from your browser.

> **Success:** Using GetBlock nodes with MetaMask makes your blockchain experience faster and more reliable than using default RPCs:
> 
> * Connect directly to trusted nodes for secure transactions.
> * Enjoy quicker transactions and smoother dApp interactions.
> * Experience less downtime, even during busy network periods

This step-by-step tutorial will guide you through connecting GetBlock’s powerful nodes to your MetaMask wallet.

---

### Before you start

#### Set up your wallet

If you don’t already have MetaMask, download and install it from the official website: <https://metamask.io/download>.

MetaMask extension is officially supported on Chrome, Brave, Firefox, Microsoft Edge, and Opera browsers.

#### Get a custom RPC URL

Generate a JSON-RPC URL for the selected network from your GetBlock [account](https://getblock.io/) and copy it.

![How to get a custom RPC URL for MetaMask](/docs-assets/Docs_MM_Generate_RPC%20URL.svg)

Generate an RPC URL for MetaMask

> **Info:** Rename your endpoints to clearly indicate their purpose.

---

### Add GetBlock RPC to an existing network

If the network is already in your list but uses a default RPC provider, you can switch to GetBlock by following these steps:

1. Click on the current network name in MetaMask to open the dropdown of networks.
1. Find the network you want to edit and click the settings menu![](/docs-assets/dots-vertical%20%281%29.svg)next to it. Select 'Edit'.

![How to set up the custom RPC URL on MetaMask](/docs-assets/Docs_MM_Add_1.svg)

3. Open the ‘**Default RPC URL**’ dropdown and select '**Add RPC URL'**.
1. Paste the JSON-RPC endpoint URL from your GetBlock account (`https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/`).
1. Name the new RPC URL for easier identification.

![How to change the RPC URL on MetaMask](/docs-assets/Docs_MM_Add_2.svg)

6. Click 'Add URL', then 'Save' to confirm.

You can now switch between RPC URLs for that network as needed.

---

### Add a new network to MetaMask

If the network isn’t in your list, you can add it as a custom network. For this example, we will add the Polygon zkEVM to MetaMask.

1. Click on the current network name.
1. Select '**Add a custom network**'.

![Adding a new network to MetaMask using custom RPC URL](/docs-assets/Docs_MM_Add_New.svg)

3. Fill in the required fields:

| Field | Description | Example |
| --- | --- | --- |
| **RPC URL** | The network's JSON-RPC URL from your GetBlock account | *https://shared.<region>.getblock.io/<ACCESS\_TOKEN>/* |
| **Chain ID** | The ID of the network | *1101* |
| **Network name** | Fetched automatically based on Chain ID | *Polygon zkEVM* |
| **Currency symbol** | Suggested automatically based on Chain ID | *ETH* |
| **Block explorer URL** | Optional field | *https://zkevm.polygonscan.com/* |

4. Click 'Save', and the custom network will be added and selected as default.

> **Info:** You can get the Chain ID of an EVM-compatible network (e.g. Polygon zkEVM) sending a request to your endpoint with this curl command:
> 
> ```bash
> curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
>   --header 'Content-Type: application/json' \
>   --data-raw '{
>     "jsonrpc": "2.0",
>     "method": "eth_chainId",
>     "params": [],
>     "id": "getblock.io"
>   }'
> ```
