Transform - Encoding

Free URL Encode API Endpoint

The free URL encode API endpoint percent-encodes text for one path segment or one query value, the way RFC 3986 says: every byte but A-Z a-z 0-9 - _ . ~ becomes %XX, so a space is %20 and a slash %2F.

  • No API key
  • RFC 3986
  • Space as %20
  • UTF-8

Percent-encode

POST/url_encode

https://aisenseapi.com/services/v1/url_encode

Call the free URL encode API endpoint

curl -X POST https://aisenseapi.com/services/v1/url_encode \
  -H "Content-Type: application/json" \
  -d '{"data": "a b/c?é"}'
{"url_encoded_data":"a%20b%2Fc%3F%C3%A9"}

The other way is the URL decode API endpoint.

What is encoded

InOutWhy
a space%20not +, which means a space only in HTML form bodies
/ ? # & =%2F %3F %23 %26 %3Dthey separate the parts of a URL
@%40ada@example.com becomes ada%40example.com
é%C3%A9each UTF-8 byte on its own
A-Z a-z 0-9 - _ . ~unchangedthe unreserved characters

Encode each segment or value on its own. Encoding a whole URL turns its own slashes into %2F.

Send the data as {"data": "..."} with Content-Type: application/json, or as the raw request body with any other content type. The raw body takes binary data as it is: curl --data-binary @file.bin -H "Content-Type: application/octet-stream".

Errors

StatuserrorWhen
400No data to encode.No data string and no body
413Data over 1 MiB.More than 1 MiB in one request

Each refusal also carries fix, a sentence saying what to send instead.

Common uses

Path arguments

This API takes its arguments in the path. A value with a space, a slash or an @ in it goes in encoded.

Query values

Build a query string for another API without a library, one value at a time.

Agents building URLs

Let an agent hand over the text and get back exactly what the URL needs, instead of guessing the escapes.

Privacy and limits

Nothing is stored. The URL encode answer is worked out while the request is open and the data is gone with it. The access log records the path and the status, not the body.

The base URL is https://aisenseapi.com/services/v1. There is no key, no account and no sign-up step. One request carries at most 1 MiB of data, and the service-wide limit is 5000 requests per IP address per day. Every endpoint in the collection is listed on the Free public REST APIs reference, and the encodings side by side on Encoding APIs.