Formatting Utilities

Format Ssn

Formats Social Security Numbers into the standard XXX-XX-XXXX format from raw digits or other formats. Call via MCP in Cursor or other AI coding tools, or use the REST endpoint `/v1/format/ssn`. Input "123456789" returns "123-45-6789". Handles validation and consistent output formatting for forms, databases, and user interfaces.

API Endpoint

GET /v1/format/ssn

Code Examples

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

response = requests.get('https://tinyfn.io/v1/format/ssn',
    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 formatting tools:

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

Learn more about MCP setup →

FAQ

How do I format a Social Security Number using MCP?

Use the Format SSN tool in your MCP-enabled editor like Cursor or Claude Code. Pass the 9-digit number as input and it returns the standard XXX-XX-XXXX format.

What input formats does the SSN formatter accept?

Accepts 9-digit strings, numbers with spaces, dots, or existing dashes. Invalid inputs with wrong digit counts or non-numeric characters will return an error.

Does the SSN formatter validate if the number is a real SSN?

No, it only formats valid 9-digit sequences into XXX-XX-XXXX format. It doesn't verify against Social Security Administration records or check for reserved number ranges.

Can I format multiple SSNs in one API call?

The endpoint processes one SSN per request. For batch processing, make multiple calls to `/v1/format/ssn` or use the MCP tool iteratively in your AI coding environment.

What happens if I pass an already formatted SSN?

The tool standardizes the format regardless of input style. "123-45-6789", "123 45 6789", or "123456789" all return the same "123-45-6789" output.

Try Format Ssn Now

Get your free API key and start using Format Ssn in seconds.

Get Free API Key