You can have a look at the doc for BatchEncoding in transformers which is the type returned from the tokenizers methods (encode_plus, batch_encode_plus, __call__).
There are a bunch of helpers available to easily map between characters, words, and tokens.