chile-kit
ES Support

Chilean mobile numbers

Normalize any common shape of a Chilean mobile (+56 9 XXXX XXXX) to E.164 for storage, and format it for display. Landlines return null.

import { formatChileanPhone, isValidChileanMobile, normalizeChileanPhone } from "chile-kit/phone";

normalizeChileanPhone("9 1234 5678");     // "+56912345678"
normalizeChileanPhone("+56 9 1234 5678"); // "+56912345678"
normalizeChileanPhone("221234567");       // null (landline)
formatChileanPhone("56912345678");        // "+56 9 1234 5678"
isValidChileanMobile("912345678");        // true