# ASCII85 Encoder API

> ASCII85 Encoder encodes text into Base85 strings or decodes existing ASCII85 payloads back to plain text. Each request returns the converted output with original and processed character counts, while paid plans add custom formats and compression ratios.

**Endpoint:** `GET https://api.apiverve.com/v1/ascii85encoder`  
**Category:** Data Conversion  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/ascii85encoder

## Overview

An ASCII85 encoder and decoder for turning text into compact base-85 encoding and back. Send a string with action set to encode and you get the Base85 output with the original and encoded lengths; send an encoded string with action set to decode and you get the plain text back. Because every 4 bytes become 5 ASCII characters, the output is about a quarter larger than the input, compared with a third for Base64.

Developers use it when working with PostScript and PDF streams, when checking what a btoa-style encoder produced, or when they need printable text that survives copy and paste between systems.

The Free plan encodes and decodes in the standard format, without delimiters. Paid plans add the format option, which wraps output in the Adobe <~ and ~> markers or strips and checks them on decode, and they return the compression_ratio field so you can see the size overhead on each request.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/ascii85encoder?text=Hello%20World&action=encode&format=standard" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | Text to encode |
| `action` | string | No | Action to perform. default encode. One of: encode, decode |
| `format` | string | No | Output format. default standard. One of: standard, btoa. Premium field |

## Response fields

- `original_text` — string · The original input text before encoding
- `encoded` — string · The encoded text in ASCII85 format
- `format` — string · The encoding format used for conversion · (premium)
- `original_length` — number · The character count of the original text
- `encoded_length` — number · The character count of the encoded text
- `compression_ratio` — string · The size ratio of encoded to original text · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "original_text": "Hello World",
    "encoded": "87cURD]i,\"Ebo7",
    "format": "standard",
    "original_length": 11,
    "encoded_length": 14,
    "compression_ratio": "127.27%"
  }
}
```

## Use cases

- **Data Encoding** — Encode binary data for text-based transmission with better compression than Base64
- **PDF Processing** — Handle ASCII85-encoded data in PDF files and PostScript documents
- **Data Serialization** — Serialize binary data for storage in text-based formats like JSON or XML
- **Compression** — Achieve better compression ratios for binary data in text-only protocols

## SDKs

- **npm** — `npm install @apiverve/ascii85encoder` (https://www.npmjs.com/package/@apiverve/ascii85encoder)
- **PyPI** — `pip install apiverve-ascii85encoder` (https://pypi.org/project/apiverve-ascii85encoder/)
- **NuGet** — `dotnet add package APIVerve.API.ASCII85Encoder` (https://www.nuget.org/packages/APIVerve.API.ASCII85Encoder)
- **Source** — https://github.com/apiverve/ascii85encoder-api

## More

- Full reference: https://docs.apiverve.com/ref/ascii85encoder
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
