URL/Slug Utilities

Is Valid Url

Validates whether a string follows proper URL format and structure. Use via MCP in Cursor or Windsurf, or call GET /v1/slug/is-valid-url with your URL string. Returns true/false with validation details. Catches malformed protocols, missing domains, invalid characters, and other common URL formatting issues that cause broken links.

API Endpoint

GET /v1/slug/is-valid-url

Code Examples

curl "https://tinyfn.io/v1/slug/is-valid-url" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/slug/is-valid-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/slug/is-valid-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 url/slug tools:

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

Learn more about MCP setup →

FAQ

What makes a URL invalid according to this validator?

Missing or malformed protocols (http/https), invalid domain formats, illegal characters, malformed port numbers, and URLs that don't conform to RFC 3986 standards.

How do I validate URLs in my AI agent workflow using MCP?

Connect the MCP tool in Claude Code or Cursor, then call is-valid-url with your URL string. Perfect for preprocessing user input or validating scraped links before making requests.

Does this check if the URL actually exists or just format validity?

Format validity only. It verifies the URL structure is correct but doesn't perform network requests to check if the endpoint is reachable.

Can it validate non-HTTP URLs like ftp:// or mailto:?

Yes, it validates various URL schemes beyond HTTP/HTTPS, including FTP, mailto, file, and other standard protocols defined in URI specifications.

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

This provides comprehensive RFC-compliant validation that handles edge cases, internationalized domains, and complex URL structures that simple regex patterns miss.

Try Is Valid Url Now

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

Get Free API Key