# Data Types\Number\ Conversion

<div id="bkmrk-" style="clear: left;">  
</div>### [![Response_Value_NumberToString.png](https://simlab-soft.com/help/uploads/images/gallery/2024-08/response-value-numbertostring.png)](https://simlab-soft.com/help/uploads/images/gallery/2024-08/response-value-number-add.png) Number To String  
  


[![Ceiling Node.png](https://simlab-soft.com/help/uploads/images/gallery/2024-08/scaled-1680-/Wu3image.png)](https://simlab-soft.com/help/uploads/images/gallery/2024-08/add-node.jpg)

  
The **Number to String** node enables the user to convert a numerical value to a string by either typing in a numerical value in the Number field or by attaching a value or a variable node to that port. Then once the conversion is executed, the resulting string can be acquired through the **String** port.


---

### String To Number

Turns a piece of text into a number you can do math with or compare.

#### What it does

This node reads the text you give it and hands back the matching number. For example, the text `“42”` comes back as the number `42`, and `“3.14”` comes back as `3.14`. Negative values like `“-7”` work too. This is handy when a value arrives as text—say from something the user typed—but you need it as a real number for calculations or comparisons.

The conversion only works when the text actually looks like a number. If you pass in something that isn’t a number, such as `“hello”`, you get no number back (an empty result). The original text is never changed—you simply get a new number value. This node is the reverse of the “Number To String” node on the same page.

#### Inputs

<table id="bkmrk-port-type-what-to-co"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What to connect</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**Execute**</td><td style="white-space: nowrap;">Trigger</td><td>Wire this from the previous node’s Execute output.</td></tr><tr><td style="white-space: nowrap;">**String**</td><td style="white-space: nowrap;">Text</td><td>The text you want turned into a number, such as `“42”` or `“3.14”`.</td></tr></tbody></table>

#### Outputs

<table id="bkmrk-port-type-what-you-g"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What you get</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**Execute**</td><td style="white-space: nowrap;">Trigger</td><td>Fires once the node has finished.</td></tr><tr><td style="white-space: nowrap;">**Number**</td><td style="white-space: nowrap;">Number</td><td>The number that matches the text. If the text isn’t a number, you get an empty result.</td></tr></tbody></table>

#### Example

<table id="bkmrk-string-input-%E2%80%9C3.14%E2%80%9D-"><tbody><tr><td>**String** input</td><td>`“3.14”`</td></tr><tr><td>**Number** output</td><td>`3.14`</td></tr></tbody></table>

#### Tips

- Make sure the text really is a number. Extra characters like spaces or a currency sign can leave you with an empty result.
- If a value reaches you as text but you need to add, subtract, or compare it, run it through this node first.