# Format Validator

Validate a value as an email address, URL, IPv4/IPv6 address, phone number, or credit card with Luhn check. Auto-detect formats locally in your browser.

## Run it

- **CLI:** `gizza tool format-validator "user@example.com"`
- **Web:** https://gizza.ai/tools/format-validator/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/format-validator/tool.json

## Inputs

- `input` — Value to validate _(field)_
- `format` — Format to check _(field)_
- `output` — Output format _(field)_

## Output

- Validation result (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `input` — Value to validate
- `format` — Format to check
- `output` — Output format

Example: `https://gizza.ai/tools/format-validator/?input=user%40example.com&format=auto&output=text`

---

## What this tool does

Paste one value and validate it as an **email address, URL, IPv4/IPv6 address,
phone number, or credit-card number**. Leave the format on **auto** to try every
supported check and report the detected format, or choose a specific format when
you need a strict yes/no answer.

Everything runs locally in your browser. The checks are syntax and checksum
checks only: there are no DNS, MX, reachability, carrier, or payment-network
lookups.

## Supported checks

- **Email** — common internet email syntax: one `@`, sane local part, domain
  labels, and alphabetic top-level domain. It does not verify mailbox existence.
- **URL** — requires a scheme such as `https://` and a host; reports the scheme
  and host that were parsed.
- **IPv4 / IPv6 / IP** — uses strict address parsing for either address family.
- **Phone** — allows a leading `+`, spaces, hyphens, dots, and parentheses; must
  contain 7 to 15 digits.
- **Credit card** — accepts spaces or hyphens, checks 12 to 19 digits with the
  Luhn algorithm, and reports a best-effort card brand.

## Example

Input:

```text
4111 1111 1111 1111
```

Format: `credit-card`

Output:

```text
Input:    4111 1111 1111 1111
Format:   credit-card
Valid:    yes
Detail:   valid card number; Luhn OK; brand Visa; 16 digits
```

## Limits and edge cases

- This is a format validator, not an identity or availability check.
- Email validation intentionally does not perform DNS or MX lookups.
- URL validation requires `scheme://host`; a bare `example.com` is not treated as
  a valid URL.
- Phone validation is length and character based; it does not know national
  numbering plans.
- Test card numbers such as `4111 1111 1111 1111` can pass Luhn without being a
  real card.

## FAQ

<details>
<summary>Does this verify that an email inbox or URL actually exists?</summary>

No. It checks syntax only. There are no DNS, MX, HTTP, or reachability probes, so
private data stays local and the result does not depend on network access.

</details>

<details>
<summary>Why does a bare domain fail URL validation?</summary>

The URL check expects a full URL with a scheme and host, such as
`https://example.com`. A bare `example.com` can be a domain name, but it is not a
complete URL for this validator.

</details>

<details>
<summary>What does auto-detect do?</summary>

Auto-detect runs every supported check and reports the first valid match in a
stable priority order: IPv4, IPv6, email, URL, credit card, then phone. It also
prints a per-format pass/fail table so you can see ambiguous cases.

</details>

<details>
<summary>Is the credit-card check safe to use?</summary>

It performs only a local Luhn checksum and simple brand detection from the number
prefix and length. It does not contact a bank or payment network, and a Luhn-pass
number is not proof that a card exists or can be charged.

</details>

## Related tools

- [Email List Cleaner](https://gizza.ai/tools/email-list-cleaner/): Clean pasted email lists: validate syntax, trim and lowercase, remove duplicates, flag malformed rows, and export a copy-ready list.
- [Email Validator](https://gizza.ai/tools/email-validator/): Validate an email address against RFC 5321/5322 syntax in your browser — flags bad domains, illegal characters and typos like gmial.com. Free, no DNS lookup.
- [Luhn Validator](https://gizza.ai/tools/luhn-validate/): Validate a credit card, IMEI, or any number against the Luhn check-digit algorithm — instantly, in your browser. Nothing is uploaded, free.
- [Extract Action Items from Meeting Notes](https://gizza.ai/tools/action-item-extractor/): Extract action items, owners, and decisions from meeting notes or daily notes with deterministic rules. Markdown checklist or JSON, private in-browser.
- [Amazon Order Analyzer](https://gizza.ai/tools/amazon-order-analyzer/): Paste an Amazon order-history CSV export to summarize total spend by month, top items, and category breakdowns. Browser-only, private, with Markdown or JSON output.
