# Quoted-printable encoder and decoder

Encode text as quoted-printable, the "=C3=A9" style used in email, or decode it.

- Endpoint: `POST https://setget.net/v1/tools/quoted-printable` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `quoted-printable`
- Page: https://setget.net/tools/quoted-printable

## Inputs

- `text` (required, string): The text to encode, or quoted-printable text to decode.
- `action` (optional, string, one of `encode`, `decode`, default `"encode"`): Encode text, or decode quoted-printable.
- `charset` (optional, string, one of `utf-8`, `iso-8859-1`, `windows-1252`, default `"utf-8"`): The character set of the bytes. Check the "charset" in the email's Content-Type header.

## Example 1

```json
{"input":{"text":"Café = coffee"}}
```

Result:

```json
{"text":"Caf=C3=A9 =3D coffee"}
```

## Example 2: A soft line break ("=" at the end of a line) is removed

```json
{"input":{"text":"Caf=C3=A9 =3D cof=\nfee","action":"decode"}}
```

Result:

```json
{"text":"Café = coffee","encoding":"utf-8","binary":false,"bytes":14}
```

## Example 3: An older Latin-1 email

```json
{"input":{"text":"Caf=E9","action":"decode","charset":"iso-8859-1"}}
```

Result:

```json
{"text":"Café","encoding":"iso-8859-1","binary":false,"bytes":4}
```

**Why do I see "=" at the ends of lines?** Quoted-printable lines may be at most 76 characters, so longer lines are split with a trailing "=". Decoding joins them again.

**Decoding shows the wrong accented letters. Why?** The email used a different character set. Try "iso-8859-1" or "windows-1252" in place of "utf-8".
