# How to convert b256 to str\[66\] in sway

**URL:** <https://forum.fuel.network/t/how-to-convert-b256-to-str-66-in-sway/2751>\
**Category:** Sway\
**Created:** [June 13, 2023, 11:46pm UTC](https://forum.fuel.network/t/how-to-convert-b256-to-str-66-in-sway/2751 "2023-06-13T23:46:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guimroque](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/guimroque/32/1462_2.png) [@guimroque](https://forum.fuel.network/u/guimroque)\
**Post date:** [June 13, 2023, 11:46pm UTC](https://forum.fuel.network/t/how-to-convert-b256-to-str-66-in-sway/2751/1 "2023-06-13T23:46:47Z")

</div>

How to convert b256 to str[66] in sway?

---

<div class="post-metadata">

**Author:** ![IGI-111](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/igi-111/32/1348_2.png) [@IGI-111](https://forum.fuel.network/u/IGI-111)\
**Post date:** [June 14, 2023, 10:32am UTC](https://forum.fuel.network/t/how-to-convert-b256-to-str-66-in-sway/2751/2 "2023-06-14T10:32:17Z")

</div>

Unfortunately we don’t have Unicode support yet so there isn’t a general purpose solution.

That said, if all you want is ASCII or if you know how to decode in general, you can use `to_le_bytes` and/or `to_be_bytes` to transform your b256 into a byte array and go from there.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/5/57d5a345cc15a64b636e0d56e042857f8a0e80b1.png) [@system](https://forum.fuel.network/u/system)\
**Post date:** [July 5, 2023, 6:32am UTC](https://forum.fuel.network/t/how-to-convert-b256-to-str-66-in-sway/2751/3 "2023-07-05T06:32:44Z")

</div>

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