---
schema_version: "1"
id: 9ab55b1b6dcd3c8ad102d928cd683997d700178f9f9a720733ef722fe0608f47
title: toRadixNumber
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-numbers-functions-toradixnumber.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-numbers-functions-toradixnumber
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 10587699bd77fb46d5888a7907bf2cd8d21229b08fa0c84ef9f0cbc24344f589
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

# 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"
}
```
