Transform - Encoding

Free Hex Encode API Endpoint

The free hex encode API endpoint turns text or any bytes into lower-case hexadecimal, two digits for every byte. Send the data as JSON or as the raw body, binary included, and read the hex back.

  • No API key
  • Lower-case hex
  • Binary safe
  • One POST request

Encode to hex

POST/hex_encode

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

Call the free hex encode API endpoint

Post the data under a data key:

curl -X POST https://aisenseapi.com/services/v1/hex_encode \
  -H "Content-Type: application/json" \
  -d '{"data": "hello"}'
{"hex_encoded_data":"68656c6c6f"}

Every byte becomes two hex digits, so the answer is twice as long as the input. Text is encoded as its UTF-8 bytes: é is the two bytes c3a9. To go the other way, use the hex decode API endpoint.

Sending the input

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".

printf '\x00\xff' | curl -X POST https://aisenseapi.com/services/v1/hex_encode \
  -H "Content-Type: application/octet-stream" --data-binary @-
{"hex_encoded_data":"00ff"}

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

See the bytes

Show exactly what a payload holds, invisible characters and byte order marks included, before something else misreads it.

Keys and digests

Hashes, keys and checksums are usually written in hex, so a value in hex can be compared with them as text.

Device protocols

Build the hex string a serial device, a radio module or a test vector expects from a command written as text.

Privacy and limits

Nothing is stored. The hex 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.