Visualize a large int
JavaScript (ES6), 64 bytes

Takes input as a string.



f=(n,i=0,[d,t]=n.split(/(...)$/))=&gt;t?f(d,i+1)+['kMGT'[d&amp;&amp;i]]+t:d


Try it online!

How?

The regular expression /(...)/$ matches the last three digits of the integer, or nothing at all if there are less than 3 digits remaining.

Because there's a capturing group, these digits -- if present -- are included in the output of the .split() method.

Examples:

'123456789'.split(/(...)$/) // --&gt; [ '123456', '789' '' ]
'123'.split(/(...)$/))      // --&gt; [ '', '123' ]
'12'.split(/(...)$/))       // --&gt; [ '12' ]
''.split(/(...)$/))         // --&gt; [ '' ]


Commented

f = (                 // f is a recursive function taking:
  n,                  //   n = input
  i = 0,              //   i = index of next prefix
  [d, t] =            //   d = either the leading digits without the last 3 ones,
                      //       or all remaining digits if there are less than 3
    n.split(/(...)$/) //   t = last three digits (or undefined)
) =&gt;                  //
  t ?                 // if t is defined:
    f(d, i + 1) +     //   append the result of a recursive call with d and i + 1
    ['kMGT'[d &amp;&amp; i]]  //   append the prefix if d is defined, or an empty string otherwise
    + t               //   append the last 3 digits
  :                   // else:
    d                 //   stop recursion and return the remaining digits