title: How do you format balances with the Polkadot JS API?
body: <p>I would like to get the balance of a user formatted using the base unit of the Substrate chain.</p>
  <p>When I use <code>toHuman()</code>, I get an opinionated formatting which includes a prefix like so:</p>
  <pre><code>let account = await api.query.system.account(&quot;EGVQCe73TpFyAZx5uKfE1222XfkT3BSKozjgcqzLBnc5eYo&quot;);
  account.data.free.toHuman()
  </code></pre>
  <blockquote>
  <p>2.8320 kKSM</p>
  </blockquote>
  <p>While <code>toNumber()</code> returns the value without any units at all:</p>
  <pre><code>account.data.free.toNumber()
  </code></pre>
  <blockquote>
  <p>2832057009447293</p>
  </blockquote>
  <p>How do I get this value with just the base units using the Polkadot JS API?</p>