# Parse TLV

Converts a Type-Length-Value (TLV) encoded string into a JSON object. Can optionally include a `Key` / `Type` entry. Parse TLV lives in the **Data format** category of the `fx` menu.

## Parameters

| Parameter     | Type    | Required | Default | Description                                            |
| ------------- | ------- | -------- | ------- | ------------------------------------------------------ |
| Input         | string  | yes      | —       | Value to transform. Previous step output or a literal. |
| Type/Key size | number  | no       | `1`     | Numeric value. Default `1`.                            |
| Length size   | number  | no       | `1`     | Numeric value. Default `1`.                            |
| Use BER       | boolean | no       | `false` | Disabled by default.                                   |

`Input` is the primary value (previous step output or a literal).

## Returned value

| Type   | Description                             |
| ------ | --------------------------------------- |
| `JSON` | Result of the Parse TLV transformation. |

## Limitations

- This operation treats Input as raw bytes (binary-capable). Non-text payloads may display differently after decoding.
- Invalid or mismatched encoding for the chosen options typically raises an evaluation error — fix the Input or options before re-running.

## Example

<details>
<summary>Run Parse TLV</summary>

Converts a Type-Length-Value (TLV) encoded string into a JSON object. Adjust optional parameters when the defaults do not match your payload.

1. Set **Input** to the value to transform (previous step output or a literal).

2. Review **Type/Key size**, **Length size**, **Use BER** and keep defaults unless your format requires otherwise.

3. Confirm **Output value** shows the transformed result.

</details>
