INVALID_INPUT
Invalid country code or VAT number format
What does INVALID_INPUT mean?
The INVALID_INPUT error means VIES rejected your request because either the country code is invalid or the VAT number format doesn't match the expected pattern. Unlike other VIES errors, this one is fixable on your end.
VIES validates the format before querying national databases. If your input doesn't pass basic validation, you'll get this error immediately.
Common causes
- Invalid country code: Using a non-EU country code or incorrect code (e.g., "UK" instead of "GB", or using "GB" post-Brexit)
- Empty VAT number: Sending a blank or null value
- Wrong format: VAT number doesn't match the country's expected pattern
- Including the country prefix twice: Sending "DEDE123456789" instead of "DE123456789"
- Special characters: Including spaces, dashes, or other non-alphanumeric characters
Valid country codes
VIES accepts these EU member state codes:
AT, BE, BG, CY, CZ, DE, DK, EE, EL (Greece), ES, FI, FR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK
Note: The UK (GB) left the EU and is no longer available through VIES.
This error is preventable
How to fix INVALID_INPUT
1. Use a VAT validation service with automatic normalization
VatDB automatically normalizes and validates VAT numbers before checking official databases. We handle country code detection, format cleaning, and checksum validation. You just send us the VAT number and we handle the rest.
2. Validate country code
Ensure the country code is a valid EU member state. Remember that Greece uses "EL" not "GR", and the UK is no longer part of VIES.
3. Clean the VAT number
Remove spaces, dashes, dots, and other special characters. Convert to uppercase.
4. Validate format before calling VIES
Each country has a specific VAT number format. Pre-validate to avoid unnecessary API calls.
Let VatDB handle input validation
VatDB automatically normalizes and validates VAT numbers before checking official EU and national databases. We handle country code detection, format cleaning, and checksum validation. You just send us the VAT number.
Try VatDB Free