# IP allowlist merger

- Human page: https://happytails.ai/en/network-tools/ip-allowlist-merger/
- Markdown: https://happytails.ai/en/network-tools/ip-allowlist-merger.md
- Structured JSON: https://happytails.ai/agents/en/network-tools/ip-allowlist-merger/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `ip-allowlist-merger` |
| Category | network-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Merging runs on your device for up to 100,000 characters and 1,000 entries, with at most 2,048 resulting CIDR blocks.

### Inputs and settings

Text input: Addresses, CIDR blocks or ranges.

Example or placeholder shown in the interface (not a validated fixture):

```text
10.20.0.0/24
10.20.1.0/24
192.0.2.10-192.0.2.20
2001:db8:1200::/40
```

One entry per line, or separate entries with commas. Text after # is ignored. Up to 100,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `hostBits` | Host bits in CIDR entries | select | "reject" | Allowed: reject, normalize |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Up to 100,000 characters and 1,000 entries per run, with at most 2,048 resulting CIDR blocks. Everything is calculated on your device and nothing is uploaded. Downloads: a plain text CIDR list, a CSV of blocks with first address, last address and address count, and a JSON report.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "ip-allowlist-merger",
  "category": "network-tools",
  "built": true,
  "requirements": "Up to 100,000 characters and 1,000 entries per run, with at most 2,048 resulting CIDR blocks. Everything is calculated on your device and nothing is uploaded. Downloads: a plain text CIDR list, a CSV of blocks with first address, last address and address count, and a JSON report.",
  "implementation": {
    "fields": [
      {
        "key": "hostBits",
        "label": "Host bits in CIDR entries",
        "value": "reject",
        "type": "select",
        "values": [
          "reject",
          "normalize"
        ],
        "labels": {
          "reject": "Reject the entry",
          "normalize": "Use the network address"
        },
        "help": "An entry such as 192.0.2.10/24 has host bits set. Rejecting it is safest; normalizing uses 192.0.2.0/24 and lists the change in the report."
      }
    ],
    "registrationFamily": "ip-prefix-sets",
    "inputMaxLength": 100000,
    "inputErrorCode": "IP_PREFIX_SETS_TOO_LONG",
    "note": "Merging runs on your device for up to 100,000 characters and 1,000 entries, with at most 2,048 resulting CIDR blocks.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 100000,
      "inputMode": "text",
      "label": "Addresses, CIDR blocks or ranges",
      "placeholder": "10.20.0.0/24\n10.20.1.0/24\n192.0.2.10-192.0.2.20\n2001:db8:1200::/40",
      "help": "One entry per line, or separate entries with commas. Text after # is ignored. Up to 100,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Combine overlapping, duplicate and adjacent IPv4 and IPv6 ranges into the smallest exact CIDR list. No address outside your original entries is added.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use IP allowlist merger

1. Paste addresses, CIDR blocks or start-end ranges, one per line.
2. Choose whether CIDR entries with host bits set are rejected or changed to their network address.
3. Run the merge and review the resulting CIDR blocks.
4. Copy the list or download the text list, CSV or JSON report.

## Useful next steps

- [IP allowlist overlap checker](https://happytails.ai/en/developer-tools/ip-allowlist-overlap-checker/) ([Markdown](https://happytails.ai/en/developer-tools/ip-allowlist-overlap-checker.md))

- [IP range exclusion tool](https://happytails.ai/en/network-tools/ip-range-exclusion-tool/) ([Markdown](https://happytails.ai/en/network-tools/ip-range-exclusion-tool.md))

- [IP range to CIDR](https://happytails.ai/en/network-tools/ip-range-to-cidr/) ([Markdown](https://happytails.ai/en/network-tools/ip-range-to-cidr.md))

- [Subnet calculator](https://happytails.ai/en/network-tools/subnet-calculator/) ([Markdown](https://happytails.ai/en/network-tools/subnet-calculator.md))

## How the merge works

Each entry is read as an exact set of addresses. Overlapping, duplicate and touching ranges are joined, and each joined range is written as the fewest aligned CIDR blocks, following the CIDR rules in RFC 4632 (2006) and the IPv6 text format in RFC 5952 (2010). A self-check confirms the blocks cover exactly the same addresses as your input, so nothing is added or lost.

### What you can paste

Use one entry per line, or separate entries with commas, semicolons or spaces. An entry can be an address such as 192.0.2.10, a CIDR block such as 192.0.2.0/24 or an inclusive range such as 192.0.2.10-192.0.2.20, and spaces around the hyphen are fine. Text after # is ignored, so you can keep comments. IPv4 parts must be 0 to 255 without leading zeros, because some systems read 010 as octal. Interface zones such as %eth0 and netmasks such as 255.255.255.0 are not accepted.

### Host bits and address families

An entry such as 192.0.2.10/24 has bits set after its prefix length. It is rejected by default, because it may be a typo for a single address. Choose Use the network address to treat it as 192.0.2.0/24; the JSON report lists every entry changed this way. IPv4 and IPv6 are handled separately, and IPv4-mapped IPv6 addresses such as ::ffff:192.0.2.1 stay in IPv6.

### Reading the report

The JSON report gives every entry a status: kept, split, merged, duplicate or covered, and names the entry that covers it. Address counts are exact whole numbers. The before count adds the size of every entry, so overlapping addresses count more than once; the after count lists each address once and always equals the addresses your input already allowed.
