> For the complete documentation index, see [llms.txt](https://docs.novabloq.com/web3-metamask/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.novabloq.com/web3-metamask/elements-details/web3-utils/from-wei.md).

# From Wei

Useful when interacting with data received from a smart contract\
[For example when getting a token rate](/web3-metamask/elements-details/web3-and-metamask/smart-contract-read/example-cake-busd-rate-on-pancaksewap.md)

## &#x20;<mark style="background-color:blue;">Parameters</mark>&#x20;

<table><thead><tr><th width="186.33333333333331">Parameter name</th><th width="100">Type</th><th>Description</th></tr></thead><tbody><tr><td>Wei</td><td>Text</td><td>It can be only text type because the number is too big. "wei" are the smallest ether unit.</td></tr><tr><td>Decimals</td><td>Number</td><td>Optional. Token decimals. Useful for correct conversion when the token has different decimals than the standard 18.</td></tr></tbody></table>

## &#x20;<mark style="background-color:blue;">States (result)</mark>&#x20;

<table><thead><tr><th width="168.33333333333331">State name</th><th width="80">Type</th><th>Description</th></tr></thead><tbody><tr><td>From WEI result</td><td>Text</td><td>It is in text format to avoid errors when the result contains too many decimals.<br>Note that the result isn't instantly available, so when using the result in the same workflow where the action is run, add a small pause (200 ms) between this action and the next one where the result is used </td></tr></tbody></table>

Demo for how to use To Wei and From Wei features:\
<https://web3-demo.bubbleapps.io/version-test/wei>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novabloq.com/web3-metamask/elements-details/web3-utils/from-wei.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
