ASCII Lookup

ASCII Lookup API

Development

Search and filter ASCII characters by decimal, hex, binary, symbol, and other attributes.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

120 requests per minute

Endpoints

1 endpoint available

Overview

Search the ASCII table, characters 0 to 255. Each result has the decimal, octal, hex and binary codes, the symbol, the HTML number and name, and a description.

Notes

  • An empty query returns the whole table (256 characters).
  • The decimal, octet, hex and bin fields match as a case-sensitive substring of the value as shown in the table, for example hex "41" or bin "0100". Hex values are upper case and octal and binary values are zero-padded.
  • The symbol, htmlNumber, htmlName and description fields match as a case-insensitive substring.
  • total is the number of matches and count is the number returned after limit is applied.
  • Control characters use their short names as the symbol, for example NUL, LF and ESC. Characters with no HTML name return htmlName: null.
  • The endpoint accepts GET with query parameters or POST with a JSON body.

Endpoints

POST
https://opentools.ca/api/v1/tools/ascii-lookup
Search the ASCII table. GET with the same fields as query parameters also works.

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
query
string
OptionalText to search for, up to 100 characters. Empty returns every character.
field
string
OptionalWhere to search: "all", "decimal", "octet", "hex", "bin", "symbol", "htmlNumber", "htmlName" or "description".Default: all
limit
number
OptionalMaximum number of characters to return, 1-256.Default: 256

Response Example

{
  "success": true,
  "query": "ampersand",
  "field": "all",
  "total": 1,
  "count": 1,
  "characters": [
    {
      "decimal": 38,
      "octal": "046",
      "hex": "26",
      "binary": "00100110",
      "symbol": "&",
      "htmlNumber": "&",
      "htmlName": "&",
      "description": "Ampersand"
    }
  ]
}

Error Codes

400
Bad Request - Invalid field, limit or query
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key is inactive or expired, or the request IP is not allowed
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code Examples

curl -X POST https://opentools.ca/api/v1/tools/ascii-lookup \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "41",
    "field": "hex"
  }'

# GET works too
curl "https://opentools.ca/api/v1/tools/ascii-lookup?query=ampersand" \
  -H "Authorization: Bearer YOUR_API_KEY"

Ready to get started?

Create an API key to start using the ASCII Lookup API.

Rather use it in your browser? Open the ASCII Lookup