Hello (author here), I found the OpenAI tool (<a href="https://platform.openai.com/tokenizer" rel="nofollow">https://platform.openai.com/tokenizer</a>
) for visualising tokens really useful when working on token optimisation strategies (and other token related tasks). But unfortunately that site doesn't support the tokeniser that GPT4 uses (currently).<p>So I threw together a stackblitz that uses the js-tiktoken to do the same thing.<p>Hopefully it will be useful for someone else too!<p>Try it here: <a href="https://react-ts-h9yrjh.stackblitz.io/" rel="nofollow">https://react-ts-h9yrjh.stackblitz.io/</a>