# How can I convert hexademical to binary?

**URL:** <https://discuss.elastic.co/t/how-can-i-convert-hexademical-to-binary/261073>\
**Category:** Kibana\
**Tags:** painless\
**Created:** [January 14, 2021, 5:34am UTC](https://discuss.elastic.co/t/how-can-i-convert-hexademical-to-binary/261073 "2021-01-14T05:34:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilyyy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lilyyy/32/51129_2.png) [@lilyyy](https://discuss.elastic.co/u/lilyyy)\
**Post date:** [January 14, 2021, 5:34am UTC](https://discuss.elastic.co/t/how-can-i-convert-hexademical-to-binary/261073/1 "2021-01-14T05:34:58Z")

</div>

Hi.  
I have packet data and type is hexadecimal.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/6/b6baaa1dec313a2f1196c7681c3df1949bb68f70.png)  
when I change to json, it looks like 01:00:00:80:00:00:00:01:00:00:00 in kibana's discover.

I want to change this hexadecimal type to binary in kibana.  
do I need to change at the logstash configuration file ? or can I change at the kibana scripted field?

I searched a lot but I have no idea how can I change the type.

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [January 14, 2021, 5:56am UTC](https://discuss.elastic.co/t/how-can-i-convert-hexademical-to-binary/261073/2 "2021-01-14T05:56:53Z")

</div>

There are clear [rules](https://www.rapidtables.com/convert/number/hex-to-binary.html) on how to do it.  
Better do this before loading into the index, if possible.

---

<div class="post-metadata">

**Author:** ![lilyyy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lilyyy/32/51129_2.png) [@lilyyy](https://discuss.elastic.co/u/lilyyy)\
**Post date:** [January 14, 2021, 6:05am UTC](https://discuss.elastic.co/t/how-can-i-convert-hexademical-to-binary/261073/3 "2021-01-14T06:05:02Z")

</div>

hello. thank you for replying.

I have many hexadecimal data in packet, then how can I change all the hexadecimal type to binary before loading into the index?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 11, 2021, 6:05am UTC](https://discuss.elastic.co/t/how-can-i-convert-hexademical-to-binary/261073/4 "2021-02-11T06:05:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
