Ip Validation

This function allows you to validate an IP address and check if it is valid and supported by our conversion services.

import { IpValidation } from '@ip2geo/sdk'

const ipAddress = '8.8.8.8'

const { ip4, ip6 } = await IpValidation(ipAddress)

Parameters

ipAddressstringrequired

The IPv4 or IPv6 address to validate.

Response

IpValidationResultobject

An object containing validation results:

  • ip4: boolean - Whether the IP address is a valid IPv4 address.
  • ip6: boolean - Whether the IP address is a valid IPv6 address.
Get Started

Convert IPs into accurate location data in milliseconds.

Sign up today and get 1,000 free monthly conversions, and discover why developers trust us for fast, reliable, and affordable IP conversions.