﻿---
title: Format data view fields
description: Field formatters for string, date, geographic point, and numeric fields in a Kibana data view. Set a custom label and choose how Kibana displays each field.
url: https://www.elastic.co/elastic/docs-builder/docs/4075/explore-analyze/find-and-organize/data-views/field-formatters
products:
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# Format data view fields
Kibana uses the same field types as Elasticsearch. Some Elasticsearch field types are unsupported in Kibana. To customize how Kibana displays data view fields, use the formatting options.
1. Go to the **Data Views** management page using the navigation menu or the [global search field](https://www.elastic.co/elastic/docs-builder/docs/4075/explore-analyze/find-and-organize/find-apps-and-objects).
2. Select the data view that contains the field you want to change.
3. Find the field, then open the edit options (![Data field edit icon](https://www.elastic.co/elastic/docs-builder/docs/4075/explore-analyze/images/kibana-edit_icon.png)).
4. Select **Set custom label**, then enter a **Custom label** for the field.
5. Select **Set format**, then select the **Format** for the field.

<note>
  For numeric fields, the default field formatters are based on the `meta.unit` field. The unit is associated with a [time unit](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/4075/reference/elasticsearch/rest-apis/api-conventions#time-units), percent, or byte. The convention for percents is to use value 1 to mean 100%.
</note>


## String field formatters

String fields support the [**String**](#string-transformations) and [`Url`](#url-field-formatter) formatters.

## Date field formatters

Date fields support the **Date**, [**String**](#string-transformations), and [`Url`](#url-field-formatter) formatters.
The **Date** formatter lets you choose the display format of date stamps using the [moment.js](https://momentjs.com/) standard format definitions.

## Geographic point field formatters

Geographic point fields support the [**String**](#string-transformations) formatter.

## Number field formatters

Numeric fields support the **Bytes and Bits**, **Color**, **Duration**, **Histogram**, **Number**, **Percentage**, [**String**](#string-transformations), and [`Url`](#url-field-formatter) formatters.
The **Bytes and Bits**, **Number**, and **Percentage** formatters let you choose the display formats of numbers in the field using the [Elastic numeral pattern](https://www.elastic.co/elastic/docs-builder/docs/4075/explore-analyze/numeral-formatting) syntax that Kibana maintains.
The **Histogram** formatter is used only for the [histogram field type](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/4075/reference/elasticsearch/mapping-reference/histogram). When you use the **Histogram** formatter, you can apply the **Bytes and Bits**, **Number**, or **Percentage** format to aggregated data.
The **Duration** field formatter displays the numeric value of a field in the following increments:
- Picoseconds
- Nanoseconds
- Microseconds
- Milliseconds
- Seconds
- Minutes
- Hours
- Days
- Weeks
- Months
- Years

You can specify these increments with up to 20 decimal places for input and output formats.
The **Color** field formatter lets you specify colors with ranges of values for a number field.
When you select the **Color** formatter, select **Add color**, then specify the **Range**, **Text color**, and **Background color**.

## String transformations

The **String** field formatter applies a transform to any field that supports it.
Supported transformations include:
- **Lower Case**
- **Upper Case**
- **Title Case**
- **Short Dots**: replaces the content before each `.` character with the first character of that segment. For example, `com.organizations.project.ClassName` becomes `c.o.p.ClassName`.
- **Base64 Decode**
- **URL Param Decode**


## `Url` field formatter

The `Url` field formatter converts the contents of any field that supports it into a link, image, or audio reference.
Types:
- **Link**: Converts the contents of the field into a URL.
- **Image**: Renders the field value as an image. You can set width and height while keeping the aspect ratio. Images smaller than those dimensions are not upscaled.
- **Audio**: Renders the field value as audio.

To customize URL field formats, use templates. A **URL template** adds values to a partial URL. To add the contents of the field to a fixed URL, use the `{{value}}` string.
For example, when:
- A field contains a user ID
- A field uses the `Url` field formatter
- The URI template is `http://company.net/profiles?user_id={­{{value}}­}`

The resulting URL replaces `{{value}}` with the user ID from the field.
The `{{value}}` template string URL-encodes the contents of the field. When a field encoded into a URL contains non-ASCII characters, the characters are replaced with a `%` character and the appropriate hexadecimal code. For example, field contents `users/admin` result in the URL template adding `users%2Fadmin`.
When the formatter type is **Image**, the `{{value}}` template string specifies the name of an image at the specified URI.
You can render base64 images from data within a document by using the following **URL template**:
```text
data:image/png;base64,{{value}}
```

For example:
![Data view editing to load base64 encoded PNG data](https://www.elastic.co/elastic/docs-builder/docs/4075/explore-analyze/images/kibana-data_view_format_url_image_base64.png)
This configuration renders a PNG file in Discover as follows:
![Sample output of PNG loading in Discover](https://www.elastic.co/elastic/docs-builder/docs/4075/explore-analyze/images/kibana-discover-render_base64_image.png)
When the formatter type is **Audio**, the `{{value}}` template string specifies the name of an audio file at the specified URI.
To pass values directly to the URL without encoding them, use the `{{rawValue}}` string.
<applies-to>Elastic Stack: Planned</applies-to> <applies-to>Elastic Cloud Serverless: Generally available</applies-to> To insert a value into the [Rison](https://github.com/Nanonid/rison)-encoded state of a Kibana app URL, use the `{{risonValue}}` string in the URL template. Place it inside single quotes, for example `query:'{{risonValue}}'`. It escapes the value for Rison, then URL-encodes it, so that values containing `'` or `!` don't break the app state.
A **Label template** specifies a text string that appears instead of the raw URL. You can use the `{{value}}` template string in label templates. You can also use the `{{url}}` template string to display the formatted URL.

## Related pages

- [Data views](https://www.elastic.co/elastic/docs-builder/docs/4075/explore-analyze/find-and-organize/data-views)
- [Customize data view fields](https://www.elastic.co/elastic/docs-builder/docs/4075/explore-analyze/find-and-organize/data-views/customize-data-view-fields)