# Install mapcidr on Windows, macOS and Linux

Expand, slice and aggregate CIDR ranges and IP lists.

mapcidr is a utility for IP ranges. It expands a CIDR block into addresses, splits it into smaller blocks, merges a list of addresses into the fewest ranges, and counts hosts. It prepares input for scanners rather than scanning anything itself.

## How to install mapcidr

```
ot install mapcidr
```

ot downloads mapcidr 1.1.97 as a prebuilt binary from [github.com/projectdiscovery/mapcidr](https://github.com/projectdiscovery/mapcidr/releases) and verifies its SHA-256 checksum before installing it. Nothing has to be compiled.

If you do not have ot yet:

macOS and Linux:

```
curl -fsSL https://otinstaller.com/install.sh | sh
```

Windows (PowerShell):

```
irm https://otinstaller.com/install.ps1 | iex
```

Current version: 0.3.0. Both scripts verify the download against its [SHA-256 checksum](https://otinstaller.com/releases/v0.3.0/checksums.txt) before installing.

## How to use mapcidr

Arguments after the tool's name go straight to mapcidr.

List every address in a range.

```
ot run mapcidr -cidr 192.0.2.0/24
```

Split a range into four equal blocks.

```
ot run mapcidr -cidr 10.0.0.0/16 -sbc 4
```

Merge a list of addresses into the fewest ranges.

```
ot run mapcidr -cl ips.txt -aggregate
```

`ot run mapcidr --help` lists every option.

An AI agent can run mapcidr too: `ot mcp` serves it over the Model Context Protocol. See [OSINT with AI agents](https://otinstaller.com/mcp/).

## mapcidr licence, platforms and versions

- Project: https://github.com/projectdiscovery/mapcidr
- Licence: MIT
- Runs on: Windows, macOS and Linux
- Takes: ip
- Categories: network, utility
- Sends traffic to the target: no
- Release binary: version 1.1.97 from github.com/projectdiscovery/mapcidr, verified by SHA-256

## Questions about mapcidr

### How do I install mapcidr on Windows?

Open PowerShell and install ot with `irm https://otinstaller.com/install.ps1 | iex`. Then run `ot install mapcidr`. ot fetches a pinned version of mapcidr and keeps it under `~/.ot`, apart from the rest of your system.

### Is mapcidr free?

Yes. mapcidr is open source, released under the MIT licence. ot, which installs it, is free under the Apache 2.0 licence.

### Do I need Go or a compiler to install mapcidr?

No. ot downloads the prebuilt mapcidr binary for your platform and checks its SHA-256 checksum. A mismatch installs nothing.

### How do I update or remove mapcidr?

`ot update mapcidr` moves it to the version pinned in ot's registry, and `ot update mapcidr --latest` to the newest upstream release. `ot remove mapcidr` uninstalls it.

## Tools related to mapcidr

- [asnmap](https://otinstaller.com/tools/asnmap/): Map an organisation, domain or IP to its ASNs and network ranges.
- [cdncheck](https://otinstaller.com/tools/cdncheck/): Identify the CDN, cloud provider or WAF in front of an IP or domain.
- [ipinfo](https://otinstaller.com/tools/ipinfo/): Look up geolocation, ASN, carrier and privacy details for IP addresses.
- [masscan](https://otinstaller.com/tools/masscan/): Internet-scale TCP port scanner.
- [naabu](https://otinstaller.com/tools/naabu/): Fast port scanner for finding open ports on hosts.
- [nmap](https://otinstaller.com/tools/nmap/): Network mapper for host discovery, port scanning and service detection.

More: [Networks and hosts](https://otinstaller.com/osint-tools/networks/).
