Transforms any text into snake_case format by converting spaces, hyphens, and camelCase to underscores with lowercase letters. Access via MCP in Cursor or Windsurf for instant variable naming, or call GET /v1/string/snake-case with your text. Perfect for database columns, Python variables, and API endpoints. Handles Unicode and preserves numbers correctly.
curl "https://tinyfn.io/v1/string/snake-case" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/snake-case', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/string/snake-case',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's string tools:
{
"mcpServers": {
"tinyfn-string": {
"url": "https://tinyfn.io/mcp/string",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
The tool automatically detects camelCase patterns like 'myVariableName' and converts them to 'my_variable_name'. It preserves numbers and handles complex cases like 'XMLHttpRequest' → 'xml_http_request'.
Spaces become underscores, hyphens become underscores, and most special characters are removed or replaced. Multiple consecutive separators collapse into single underscores.
Yes, invoke the snake_case tool in Cursor, Windsurf, or other MCP editors to instantly convert selected text or generate proper variable names from descriptions during coding.
The tool processes Unicode characters appropriately, converting accented letters to their base forms and handling international text while maintaining the snake_case format.
Snake case uses underscores (my_variable) while kebab case uses hyphens (my-variable). Snake case is preferred for programming languages, kebab case for URLs and CSS classes.