Case Conversion Utilities

To Snake Case

Converts any text to snake_case format, transforming spaces, hyphens, and camelCase into lowercase words separated by underscores. Access via MCP in Cursor or Windsurf for variable naming, or hit GET /v1/case/snake with your text. Perfect for Python variables, database columns, and API field names where snake_case is the standard convention.

API Endpoint

GET /v1/case/snake

Code Examples

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

response = requests.get('https://tinyfn.io/v1/case/snake',
    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 case conversion tools:

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

Learn more about MCP setup →

FAQ

How do I convert camelCase to snake_case?

Pass your camelCase text to the tool and it automatically converts boundaries like 'firstName' → 'first_name' and 'XMLHttpRequest' → 'xml_http_request'.

What characters get converted to underscores in snake_case?

Spaces, hyphens, dots, and camelCase boundaries become underscores. Multiple consecutive separators collapse into single underscores.

Can I use this MCP tool in my AI coding workflow?

Yes, invoke it from Cursor, Claude Code, or other MCP-enabled editors when refactoring JavaScript objects to Python dictionaries or standardizing API field names.

Does snake_case conversion handle acronyms correctly?

Yes, it preserves acronym readability by converting 'HTTPSConnection' to 'https_connection' rather than splitting each letter.

What's the difference between snake_case and kebab-case conversion?

Snake_case uses underscores for separation (file_name), while kebab-case uses hyphens (file-name). Choose based on your language conventions.

Try To Snake Case Now

Get your free API key and start using To Snake Case in seconds.

Get Free API Key