# Convert HEx to ascii

**URL:** <https://discuss.elastic.co/t/convert-hex-to-ascii/249739>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [September 24, 2020, 6:15am UTC](https://discuss.elastic.co/t/convert-hex-to-ascii/249739 "2020-09-24T06:15:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThePreMan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thepreman/32/82548_2.png) [@ThePreMan](https://discuss.elastic.co/u/ThePreMan)\
**Post date:** [September 24, 2020, 6:15am UTC](https://discuss.elastic.co/t/convert-hex-to-ascii/249739/1 "2020-09-24T06:15:20Z")

</div>

Hi again 🙂 In my current Project we are using dlt-tools to convert dlt logs into ascii to be read by logstash. Our dlt viewer is using a specific plugin to convert some lines from hex to ascii.  
This is our log structure:  
`Index Timestamp Timestamp Tag1 Tag2 Tag3 Payload`  
When `Payload` is hex it is also surrounded by `[SOME HEX]` brackets.  
What we would need is a dynamic logstash config that detects when Payload is Hex and then use some plugin to turn it into text (if the conversion works for us at all)  
Thanks

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 24, 2020, 12:34pm UTC](https://discuss.elastic.co/t/convert-hex-to-ascii/249739/2 "2020-09-24T12:34:41Z")

</div>

Logstash provide ruby filter that can be used to provide custom code  
here is an [example](https://stackoverflow.com/questions/61862014/logstash-convert-hex-to-ascii)

---

<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:** [October 22, 2020, 12:34pm UTC](https://discuss.elastic.co/t/convert-hex-to-ascii/249739/3 "2020-10-22T12:34:42Z")

</div>

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