---
title: Telegraf input data formats
description: Telegraf input plugins use parsers to convert incoming data, such as JSON, CSV, and Prometheus format, into Telegraf metrics.
url: https://docs.influxdata.com/telegraf/v1/data_formats/input/
estimated_tokens: 1809
product: Telegraf Enterprise
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/data_formats/input/
date: '2026-08-13T16:00:16-06:00'
lastmod: '2026-08-13T16:00:16-06:00'
---

Telegraf input plugins use **parsers** to convert incoming data into[Telegraf metrics](/telegraf/v1/concepts/metrics/).
Any input plugin that supports the `data_format` option can use it to
select a parser:

```toml
[[inputs.file]]
  files = ["example.json"]

  ## Data format to consume.
  data_format = "json_v2"
```

Each parser has its own configuration options for describing your data’s
schema and how it maps to metric names, tags, fields, and timestamps.
For guidance on choosing and configuring a parser, including timestamp
format reference and worked examples, see[Parse incoming data](/telegraf/v1/configure_plugins/input_plugins/parse-data/).

## Choose a JSON parser

Three parsers read JSON data.
They differ in how much control they give you and how they handle nested
structures:

|                          Parser                          |                    Best for                     |                Value selection                 |                             Type control                             |
|----------------------------------------------------------|-------------------------------------------------|------------------------------------------------|----------------------------------------------------------------------|
|      [json](/telegraf/v1/data_formats/input/json/)       |                  Flat objects                   |Flattens everything; optional GJSON `json_query`|Numbers only by default; strings and booleans via `json_string_fields`|
|   [json\_v2](/telegraf/v1/data_formats/input/json_v2/)   |Existing configurations that select nested values|                  GJSON paths                   |                       Per-value `type` option                        |
|[xpath\_json](/telegraf/v1/data_formats/input/xpath_json/)| Nested documents and arrays; new configurations |               XPath 1.0 queries                |           XPath conversion functions or native JSON types            |

> [!Important]
> We recommend `xpath_json` over `json_v2` for new
> configurations, especially when working with arrays.
> Use `json` when your data is flat and you don’t need type control.

## Available parsers

### [Avro](/telegraf/v1/data_formats/input/avro/)

Use the `avro` input data format to parse Avro binary or JSON data into Telegraf metrics.

### [Binary](/telegraf/v1/data_formats/input/binary/)

Use the `binary` input data format with user-specified configurations to parse binary protocols into Telegraf metrics.

### [Collectd](/telegraf/v1/data_formats/input/collectd/)

Use the `collectd` input data format to parse collectd network binary protocol to create tags for host, instance, type, and type instance.

### [CSV](/telegraf/v1/data_formats/input/csv/)

Use the `csv` input data format to parse comma-separated values into Telegraf metrics.

### [Dropwizard](/telegraf/v1/data_formats/input/dropwizard/)

Use the `dropwizard` input data format to parse Dropwizard JSON representations into Telegraf metrics.

### [Form URL-encoded](/telegraf/v1/data_formats/input/form_urlencoded/)

Use the `form-urlencoded` data format to parse `application/x-www-form-urlencoded` data, such as HTTP query strings.

### [Graphite](/telegraf/v1/data_formats/input/graphite/)

Use the `graphite` input data format to parse Graphite dot buckets into Telegraf metrics.

### [Grok](/telegraf/v1/data_formats/input/grok/)

Use the `grok` data format to parse line-delimited data using a regular expression-like language.

### [InfluxDB line protocol](/telegraf/v1/data_formats/input/influx/)

Use the `influx` line protocol input data format to parse InfluxDB metrics directly into Telegraf metrics.

### [JSON](/telegraf/v1/data_formats/input/json/)

Use the `json` input data format to parse flat JSON objects, or an array of flat objects, into Telegraf metrics. Includes a complete option reference and worked examples.

### [JSON v2](/telegraf/v1/data_formats/input/json_v2/)

Use the `json_v2` input data format to select values out of JSON documents with GJSON paths and map them to Telegraf metric names, tags, fields, and timestamps. Includes a complete option reference and worked examples.

### [Logfmt](/telegraf/v1/data_formats/input/logfmt/)

Use the `logfmt` input data format to parse logfmt data into Telegraf metrics.

### [Nagios](/telegraf/v1/data_formats/input/nagios/)

Use the `nagios` input data format to parse the output of Nagios plugins into Telegraf metrics.

### [OpenMetrics](/telegraf/v1/data_formats/input/openmetrics/)

Use the `openmetrics` input data format to parse OpenMetrics text format into Telegraf metrics.

### [OpenTSDB Telnet PUT API](/telegraf/v1/data_formats/input/opentsdb/)

Use the `opentsdb` data format to parse OpenTSDB Telnet `PUT` API data into Telegraf metrics.

### [Parquet](/telegraf/v1/data_formats/input/parquet/)

Use the `parquet` input data format to parse Apache Parquet files into Telegraf metrics.

### [Prometheus](/telegraf/v1/data_formats/input/prometheus/)

Use the `prometheus` input data format to parse Prometheus text exposition format into Telegraf metrics.

### [Prometheus Remote Write](/telegraf/v1/data_formats/input/prometheus-remote-write/)

Use the `prometheusremotewrite` input data format to parse Prometheus Remote Write samples into Telegraf metrics.

### [Value](/telegraf/v1/data_formats/input/value/)

Use the `value` input data format to parse single values into Telegraf metrics.

### [Wavefront](/telegraf/v1/data_formats/input/wavefront/)

Use the `wavefront` input data format to parse Wavefront data into Telegraf metrics.

### [XML](/telegraf/v1/data_formats/input/xml/)

Use the `xml` input data format and XPath expressions to parse XML data into Telegraf metrics.

### [XPath CBOR](/telegraf/v1/data_formats/input/xpath_cbor/)

Use the `xpath_cbor` input data format and XPath expressions to parse Concise Binary Object Representation (CBOR) data into Telegraf metrics.

### [XPath JSON](/telegraf/v1/data_formats/input/xpath_json/)

Use the `xpath_json` input data format and XPath expressions to parse JSON into Telegraf metrics. Includes the JSON-to-tree mapping, a complete option reference, and verified examples.

### [XPath MessagePack](/telegraf/v1/data_formats/input/xpath_msgpack/)

Use the `xpath_msgpack` input data format and XPath expressions to parse MessagePack data into Telegraf metrics.

### [XPath Protocol Buffers](/telegraf/v1/data_formats/input/xpath_protobuf/)

Use the `xpath_protobuf` input data format and XPath expressions to parse Protocol Buffers data into Telegraf metrics.

#### Related

* [Parse incoming data](/telegraf/v1/configure_plugins/input_plugins/parse-data/)
* [Telegraf metrics](/telegraf/v1/concepts/metrics/)
| Parser | Best for | Value selection | Type control |
| --- | --- | --- | --- |
| Parser | Best for | Value selection | Type control |
| json | Flat objects | Flattens everything; optional GJSON  json_query | Numbers only by default; strings and booleans via  json_string_fields |
| json_v2 | Existing configurations that select nested values | GJSON paths | Per-value  type  option |
| xpath_json | Nested documents and arrays; new configurations | XPath 1.0 queries | XPath conversion functions or native JSON types |
