---
title: "Text Encoding & Decoding API"
slug: text-encoding-decoding-api
url: https://apyhub.com/freedailypro/service/text-encoding-decoding-api
provider: FreeDailyPro
tags: [url-encoding, html-entities, binary, hex, encoding, decoding]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 3
atoms: 10
mcp: true
---

# Text Encoding & Decoding API

Easily encode and decode text using the Text Encoding & Decoding API. Convert URLs, HTML entities, binary and hex in both directions.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/url` | What it does Encodes text so it can be safely used in a URL, or decodes an encoded URL back to read… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/html-entities` | What it does Encodes special characters such as <, >, & and " as HTML entities, or decodes entities… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/binary-ascii` | What it does Converts text to binary or hexadecimal, and back again. Choose the direction with acti… | 10 |

## Endpoint reference

### URL Encode / Decode

`POST https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/url` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | body | string | yes |  |
| `action` | body | string | yes | One of: encode, decode. |
| `component` | body | boolean | no |  |

#### Quickstart

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

```bash
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:

```json
{
  "tool": "Url encoder client and server side from freedailypro",
  "action": "encode",
  "result": "https%3A%2F%2Fexample.com%2Flogin%3Ftoken%3Dabc123"
}
```

### HTML Entities Encode / Decode

`POST https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/html-entities` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | body | string | yes |  |
| `action` | body | string | yes | One of: encode, decode. |

#### Quickstart

Convert text to HTML entities with one simple request.

```bash
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:

```json
{
  "tool": "Html entity converter client and server side from freedailypro",
  "action": "encode",
  "result": "Tom &amp; Jerry &lt;b&gt;fun&lt;/b&gt;"
}
```

### Text to Binary & Hex Converter

`POST https://api.eu.apyhub.com/freedailypro/text-encoding-decoding-api/security/binary-ascii` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | body | string | yes |  |
| `action` | body | string | yes | One of: toBinary, fromBinary, toHex, fromHex. |
| `separator` | body | string | no |  |

#### Quickstart

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

```bash
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:

```json
{
  "tool": "Binary ascii converter client and server side from freedailypro",
  "action": "toBinary",
  "result": "01001000 01100101 01101100 01101100 01101111 00100000 01110111 01101111 01110010 01101100 01100100"
}
```

## About

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

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/freedailypro/service/text-encoding-decoding-api
