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.
- Go to the Data Views management page using the navigation menu or the global search field.
- Select the data view that contains the field you want to change.
- Find the field, then open the edit options (
). - Select Set custom label, then enter a Custom label for the field.
- Select Set format, then select the Format for the field.
For numeric fields, the default field formatters are based on the meta.unit field. The unit is associated with a time unit, percent, or byte. The convention for percents is to use value 1 to mean 100%.
String fields support the String and Url formatters.
Date fields support the Date, String, and Url formatters.
The Date formatter lets you choose the display format of date stamps using the moment.js standard format definitions.
Geographic point fields support the String formatter.
Numeric fields support the Bytes and Bits, Color, Duration, Histogram, Number, Percentage, String, and Url 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 syntax that Kibana maintains.
The Histogram formatter is used only for the histogram field type. 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.
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.ClassNamebecomesc.o.p.ClassName. - Base64 Decode
- URL Param Decode
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
Urlfield 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:
data:image/png;base64,{{value}}
For example:

This configuration renders a PNG file in Discover as follows:

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.
{{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.