# How to convert a HEX value to a char?

**URL:** <https://forum.mikrotik.com/t/how-to-convert-a-hex-value-to-a-char/97913>\
**Category:** Scripting\
**Created:** [May 6, 2016, 6:18am UTC](https://forum.mikrotik.com/t/how-to-convert-a-hex-value-to-a-char/97913 "2016-05-06T06:18:10Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![rextended](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/rextended/32/67729_2.png) [@rextended](https://forum.mikrotik.com/u/rextended)\
**Post date:** [August 7, 2021, 10:48pm UTC](https://forum.mikrotik.com/t/how-to-convert-a-hex-value-to-a-char/97913/9 "2021-08-07T22:48:25Z")

</div>

search tag # rextended hex2chr hexadecimal to char

Mmm… but simply:

```plaintext
[rextended@MATRIX] > :global hex2chr do={:return [[:parse "(\"\\$1\")"]]}
[rextended@MATRIX] > :put [$hex2chr 64]
d
[rextended@MATRIX] >

```

just do not pass lowercase or invalid hex digit, only uppercase.

see here for the function to convert a string of HEX value to a string of Chars, it also check lower/upper/invalid hex:  
[https://forum.mikrotik.com/viewtopic.php?f=9&t=129693&p=871742#p871742](https://forum.mikrotik.com/viewtopic.php?f=9&t=129693&p=871742#p871742)

---

_[View the full topic](https://forum.mikrotik.com/t/how-to-convert-a-hex-value-to-a-char/97913)._
