Validation Utilities

Validate Url

Validates URL syntax and structure according to RFC 3986 standards. Access via MCP in Cursor or Windsurf for instant validation, or hit GET /v1/validate/url with a query parameter. Returns boolean validity plus detailed error messages for malformed URLs. Handles edge cases like internationalized domains and custom schemes that basic regex checks miss.

API Endpoint

GET /v1/validate/url

Code Examples

curl "https://tinyfn.io/v1/validate/url" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/validate/url', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/validate/url',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's validation tools:

{
  "mcpServers": {
    "tinyfn-validation": {
      "url": "https://tinyfn.io/mcp/validation",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I validate a URL using the TinyFn MCP tool?

Call the validate_url function with your URL string as a parameter. The tool returns a boolean validity status plus specific error details for debugging malformed URLs.

What URL formats does TinyFn's validator support?

Supports HTTP/HTTPS, FTP, custom schemes, internationalized domain names (IDN), IPv6 addresses, and port numbers. Validates against RFC 3986 standards for comprehensive coverage.

Does URL validation check if the website actually exists?

No, this validates syntax and structure only. It doesn't perform network requests to verify if the URL is reachable or returns valid content.

Can I validate URLs with special characters or Unicode domains?

Yes, the validator handles internationalized domain names (IDN) and properly encoded special characters. It follows RFC 3986 for Unicode normalization and percent-encoding rules.

What's the difference between this and basic regex URL validation?

TinyFn's validator implements full RFC 3986 compliance, handles edge cases like IPv6 brackets, validates port ranges, and provides specific error messages instead of just true/false.

Try Validate Url Now

Get your free API key and start using Validate Url in seconds.

Get Free API Key