# How to decode with spaces?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-decode-with-spaces%2F17289%3E%5C
**Category:** 🤗Tokenizers\
**Created:** [April 28, 2022, 1:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-decode-with-spaces%2F17289 "2022-04-28T13:39:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![timbmg](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/timbmg/32/42495_2.png) [@timbmg](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftimbmg)%5C
**Post date:** [April 28, 2022, 1:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-decode-with-spaces%2F17289%2F1 "2022-04-28T13:39:45Z")

</div>

How can I decode token by token, i.e. without the tokenizer removing spaces for punctuation? In the example below, i would expect `[CLS] hello world . [SEP]`, i.e. a space between `world` and `.`.

```auto
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
x = tokenizer.encode("Hello World.")
tokenizer.decode(x, clean_up_tokenization_spaces=False)
# '[CLS] hello world. [SEP]'

```
