apyhub
Back

Text Encoding & Decoding API

What it does

Text Encoding Tools converts text between common web-safe formats. Send plain text and choose an action, and you get the transformed string back in a structured response.

Use the URL encoder to encode or decode text, with an optional component flag for URL component handling. Use the HTML entity converter to encode or decode HTML entities. Use the binary and ASCII converter to transform text to and from binary or hex, with optional separator support when encoding or decoding binary and hex strings.

Each endpoint returns the performed action and the converted result, along with the tool name that produced it. That makes it straightforward to plug into validation flows, content pipelines, or internal utilities that need deterministic text transformations.

Text Encoding Tools fits frontend sanitisation, query-string building, template rendering, and low-level debugging where you need to inspect or normalize encoded data without guessing how it was transformed.

▣ ENDPOINT 01 / 03
POST
URL Encode / Decode
https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/url

QUICKSTART

GUIDE

Quickstart

Encode or decode a piece of text for security URL handling with the required action and text fields.

curl -X POST "https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "https://example.com/login?token=abc123",
    "action": "encode"
  }'

What you'll get back

The live response to the request above:

{
  "tool": "Url encoder client and server side from freedailypro",
  "action": "encode",
  "result": "https%3A%2F%2Fexample.com%2Flogin%3Ftoken%3Dabc123"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Encodes text so it can be safely used in a URL, or decodes an encoded URL back to readable text, chosen with action. By default (component: true) reserved characters such as / ? & = are encoded too, which is what you need for a single query parameter value. Set component to false to encode a full URL while keeping its structure.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe input string to encode or decode.
actionENUMYesOperation to perform: encode or decode.
componentBooleanNoWhen true (default), also encodes / ? & = and other reserved characters. Set false to encode a full URL while keeping its structure.

Response

A successful call returns a JSON object with these fields:

ParameterTypeDescription
toolStringName of the tool that produced the response.
actionStringThe action that was performed (echoes the request).
resultStringThe URL-encoded or decoded text.
▣ ENDPOINT 02 / 03
POST
HTML Entities Encode / Decode
https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/html-entities

QUICKSTART

GUIDE

Quickstart

Convert text to HTML entities with one simple request.

curl -X POST "https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/html-entities" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"Tom & Jerry <b>fun</b>","action":"encode"}'

What you'll get back

The live response to the request above:

{
  "tool": "Html entity converter client and server side from freedailypro",
  "action": "encode",
  "result": "Tom &amp; Jerry &lt;b&gt;fun&lt;/b&gt;"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Encodes special characters such as <, >, & and " as HTML entities, or decodes entities back to normal characters, chosen with action. Encoding lets you safely show user-provided text inside a web page without it being treated as HTML.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe text to convert.
actionENUMYesConversion mode. Allowed values: encode, decode.

Response

A successful call returns a JSON object with these fields:

ParameterTypeDescription
toolStringName of the tool that produced the response.
actionStringThe action that was performed (echoes the request).
resultStringThe text with HTML entities encoded or decoded.
▣ ENDPOINT 03 / 03
POST
Text to Binary & Hex Converter
https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/binary-ascii

QUICKSTART

GUIDE

Quickstart

Convert text to binary with the required action and an optional separator.

curl -X POST "https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/binary-ascii" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello world","action":"toBinary","separator":" "}'

What you'll get back

The live response to the request above:

{
  "tool": "Binary ascii converter client and server side from freedailypro",
  "action": "toBinary",
  "result": "01001000 01100101 01101100 01101100 01101111 00100000 01110111 01101111 01110010 01101100 01100100"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Converts text to binary or hexadecimal, and back again. Choose the direction with action (toBinary, fromBinary, toHex, fromHex), and set the character placed between each byte with separator. Use it for debugging, teaching, or working with low-level data.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe source text to convert.
actionENUMYesConversion mode. Allowed values: toBinary, fromBinary, toHex, fromHex.
separatorStringNoSeparator used in the converted output, if provided. Maximum length: 3. Default: a single space.

Response

A successful call returns a JSON object with these fields:

ParameterTypeDescription
toolStringName of the tool that produced the response.
actionStringThe action that was performed (echoes the request).
resultStringThe converted text, binary or hex.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.