---
title: avro
page-cloud: true
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-connect-version: 4.118.0
latest-redpanda-tag: v26.2.7
docname: connect/components/processors/avro
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/processors/avro.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/processors/avro.adoc
description: Performs Avro based operations on messages based on a schema.
page-context-switcher:
  - name: Processor
    to: /cloud-data-platform/develop/connect/components/processors/avro/
  - name: Scanner
    to: /cloud-data-platform/develop/connect/components/scanners/avro/
page-self-managed-available: "true"
page-self-managed-available-url: https://docs.redpanda.com/connect/components/processors/avro/
page-git-created-date: "2024-09-09"
page-git-modified-date: "2026-11-13"
page-generated-sources:
  - include: connect:components:partial$descriptions/processors/avro.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
page-generated-content: partial
---

# avro

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/avro.md -->

Performs Avro based operations on messages based on a schema.

> ⚠️ **WARNING**
>
> If you are consuming or generating messages using a schema registry service then it is likely this processor will fail as those services require messages to be prefixed with the identifier of the schema version being used. Instead, try the [`schema_registry_encode`](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/schema_registry_encode/) and [`schema_registry_decode`](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/schema_registry_decode/) processors.

## Operators

### `to_json`

Converts Avro documents into a JSON structure. This makes it easier to manipulate the contents of the document within Benthos. The encoding field specifies how the source documents are encoded.

### `from_json`

Attempts to convert JSON documents into Avro documents according to the specified encoding.

#### Common

```yml
processor:
  label: ""
  avro:
    operator: to_json # No default (required)
    encoding: textual
    schema: ""
    schema_path: ""
```

#### Advanced

```yml
processor:
  label: ""
  avro:
    operator: to_json # No default (required)
    encoding: textual
    schema: ""
    schema_path: ""
```

## Fields

### `encoding`

An Avro encoding format to use for conversions to and from a schema.

**Type**: `string`

**Default**: `textual`

**Options**: `textual`, `binary`, `single`

### `operator`

The [operator](#operators) to execute

**Type**: `string`

**Options**: `to_json`, `from_json`

### `schema`

A full Avro schema to use.

**Type**: `string`

**Default**: `""`

### `schema_path`

The path of a schema document to apply. Use either this or the `schema` field. URLs must begin with `file://` or `http://`. Note that `file://` URLs must use absolute paths (for example, `file:///absolute/path/to/spec.avsc`); relative paths are not supported.

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
schema_path: file:///path/to/spec.avsc

# ---

schema_path: http://localhost:8081/path/to/spec/versions/1
```