---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/tools/encoding/variables/textEscapeTool.md
description: Escape or unescape special characters for a target context.
---

# Variable: textEscapeTool

```ts
const textEscapeTool: Tool<SpooledArtifact>;
```

Defined in: [batteries/tools/encoding/index.ts:107](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/tools/encoding/index.ts#L107)

Escape or unescape special characters for a target context.

## Remarks

Supports `json_string`, `regex`, `csv_field`, `sql_like`, and `markdown` targets. Returns
an error string for unknown targets rather than throwing.
