{"uid":"cap_mL4gVks-rG14mcFK7Dy3J","slug":"lookproof-ip-range-to-cidr-converter-543fd97b","name":"Lookproof IP Range to CIDR Converter","description":"Check SPF, DMARC, DKIM, MTA-STS, DNSSEC and more, with results that explain what was found and why. Free browser checks and a pay-per-request API with x402.","url":"https://api.lookproof.dev/v1/ip/range-to-cidr?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","title":"IpRangeInput","required":["start","end"],"properties":{"end":{"type":"string","title":"End","maxLength":64,"minLength":2},"start":{"type":"string","title":"Start","maxLength":64,"minLength":2}},"additionalProperties":false}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_MATr8LRXoMje39YgBoidP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a start and end IPv4 or IPv6 address into the minimal list of CIDR blocks that exactly covers that range.","exampleAgentPrompt":"Convert the IP range from 203.0.113.5 to 203.0.113.50 into the smallest set of CIDR blocks I can use for firewall rules.","exampleUseCases":[{"title":"Firewall ACL from provider IP range","prompt":"Our payment processor gave us the IP range 198.51.100.0 to 198.51.100.127 — can you turn that into CIDR blocks so I can add them to our firewall allowlist?"},{"title":"SPF record for a mail relay range","prompt":"I need to add our mail relay's IP range 10.20.30.1 through 10.20.30.63 to our SPF record as network prefixes — what CIDR blocks should I use?"},{"title":"IPv6 range for cloud egress rules","prompt":"Convert the IPv6 range 2001:db8::1 to 2001:db8::ff into CIDR notation so I can write egress rules for our cloud security group."}],"resultDescription":"A list of CIDR blocks (in prefix/length notation) that collectively and exactly cover the specified start-to-end IP address range, using the fewest possible blocks — up to 62 for IPv4 ranges and up to 254 for IPv6 ranges. The result is ready to paste directly into firewall rules, ACL entries, or SPF records.","failureModes":["Invalid IP address format returns an error (e.g. non-numeric octets, out-of-range values)","Start address greater than end address returns an error","Mixing IPv4 and IPv6 addresses in the same request returns an error","Missing required start or end parameter returns a 400 Bad Request","Extremely large ranges that exceed the 62/254 CIDR block limit may return an error or truncated result"],"whenToPreferThis":"Use this endpoint when you need to express an arbitrary IP address range as firewall, ACL, or SPF entries in CIDR notation and want the minimal covering set with no overlaps or gaps. It operates fully offline (no external DNS or registry calls), making it fast and deterministic. Prefer it over manual calculation or general-purpose libraries when an agent needs a reliable, API-accessible computation with a well-defined output limit.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:49.692Z","isFirstParty":false,"canonicalSlug":"lookproof-ip-range-to-cidr-converter-543fd97b"}