Encoding Utilities

Ascii Encode

Converts text characters into their corresponding ASCII code values. Access via MCP in Cursor or Windsurf, or REST API at `/v1/encode/ascii/encode`. Input "Hello" returns `[72, 65, 108, 108, 111]`. Essential for protocol implementations, data serialization, and debugging character encoding issues in AI-assisted development workflows.

API Endpoint

GET /v1/encode/ascii/encode

Code Examples

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

response = requests.get('https://tinyfn.io/v1/encode/ascii/encode',
    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 encoding tools:

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

Learn more about MCP setup →

FAQ

How do I get ASCII codes for a string using this tool?

Send your text to the endpoint and receive an array of ASCII decimal values. For example, 'ABC' returns [65, 66, 67].

What happens with non-ASCII characters like emojis or accented letters?

Non-ASCII characters (Unicode > 127) will either return their Unicode code point or cause an error, depending on implementation. Stick to basic ASCII (0-127) for reliable results.

Can I use this MCP tool in my AI coding assistant for debugging?

Yes, it's perfect for diagnosing character encoding issues. AI agents in Cursor or Cline can quickly check if strings contain unexpected characters by examining their ASCII values.

What's the difference between ASCII encoding and Base64 encoding?

ASCII encoding returns numeric character codes (65 for 'A'), while Base64 transforms binary data into ASCII-safe text. They serve completely different purposes.

Does this tool handle whitespace and special characters?

Yes, all ASCII characters including spaces (32), newlines (10), tabs (9), and punctuation get their proper ASCII codes.

Try Ascii Encode Now

Get your free API key and start using Ascii Encode in seconds.

Get Free API Key