---
schema_version: "1"
id: 7f07f735aa5705670198cca5cf30625c5049b4a858998349c81d01d69eced32d
title: toRadixNumber
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-numbers-functions-toradixnumber.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-numbers-functions-toradixnumber
source_site: docs.mulesoft.com
content_type: documentation
content_hash: a86c0a25effb5eb09e283a309c0cd2c945dd64abb78e5e16cba4fe1a62d772da
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# toRadixNumber

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## toRadixNumber(number: Number, radix: Number): String

Transforms a decimal number into a number string in other radix.

_Introduced in DataWeave version 2.2.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>number</code></p></td><td><p>The decimal number.</p></td></tr><tr><td><p><code>radix</code></p></td><td><p>The radix of the result number.</p></td></tr></tbody></table>

### Example

This example shows how the `toRadixNumber` behaves under different inputs.

#### Source

```DataWeave
%dw 2.0
import toRadixNumber from dw::core::Numbers
output application/json
---
{
    a: toRadixNumber(2, 2),
    b: toRadixNumber(255, 16)
}
```

#### Output

```JSON
{
  "a": "10",
  "b": "ff"
}
```
