Do you want to convert a number to hexadecimal in Power Automate? In this Power Automate tutorial, we will see how to convert numbers to hexadecimal in Power Automate.
Here, we will cover the topics below:
- Convert numbers to hexadecimal in Power Automate Format number action.
- Convert numbers to hexadecimal in Power Automate formatNumber()
Convert numbers to hexadecimal in Power Automate using the Format number action
Here, we will see how to convert the number to hexadecimal using the Format number action in Power Automate.
Example 1
For example, I have the number 123456 and want to convert it to hexadecimal, i.e., 1E240; for this, we will use the format X0.
1. In Power Automate Cloud, select the + Create button and then select Instant Cloud flow.

2. Now provide the flow name and select the “Manually trigger a flow” action. Then click on Create.

Now, you can see the “Manually trigger a flow” action is added to the flow.

3. Now, we will format a number into hexadecimal. For this, click on the +New step -> select Format number action. Then provide the below information:
- Number: Provide the number to convert hexadecimal
- Format: Provide the format as X0

4. Now save and run the flow manually; you can see the output as hexadecimal.

Example 2
For example, I have the number 123456, and I want to convert it to hexadecimal, i.e., 1e240; for this, we will use the format x0.
1. In this case, we will change the format; for this, expand the formatNumber action and then change the format to x0.

2. Now run the flow manually, and you can see the output as hexadecimal.

This is how to convert any number into a hexadecimal format in Power Automate flow using the Format number action.
Convert numbers to hexadecimal in Power Automate formatNumber()
Here, we will see how to convert numbers to hexadecimal in Power Automate formatNumber().
Example 1
For example, I have the number 123457, and I want to convert it to hexadecimal, i.e. 1E241; for this, we will use the format X0.
1. In Power Automate Cloud, select the +Create button and then select Instant Cloud flow.

2. Now provide the flow name and select the “Manually trigger a flow” action. Then click on Create.

Now, you can see that the “Manually trigger a flow” action is added.

3. Now, we will format a number into hexadecimal. For this, click on the +New step -> select Compose action. Then provide the below information:
- Inputs: Provide the below expression:
formatNumber(123457, 'X')

4. Now run the flow manually, and you can see the output as hexadecimal in Power Automate.

Example 2
For example, I have the number 123457 and want to convert it to hexadecimal, i.e., 1e241; for this, we will use the format x0.
1. In this case, we will change the expression in the Compose action, so expand the Compose action and then provide the below information
- Inputs: Provide the below expression
formatNumber(123457, 'x')

2. Now save and run the flow manually, and you can see the output as hexadecimal.

This is how to format the number to hexadecimal using the Power Automate formatNumber function.
Conclusion
In this Power Automate tutorial, we saw how to convert a number to hexadecimal using Power Automate.
You may also like:
- How to Convert Value to String in Power Automate?
- Convert String to Date for SharePoint list using Power Automate
- Convert Float to Integer in Power Automate
- A file with the same name is currently being saved to this site error in Power Automate
- Format Number Thousand Separator in Power Automate
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com