Encode a structure
Paste JSON and the bencode bytes appear as hex or Base64. The grammar is small enough to read by eye: i42e is an integer, 4:spam is a string prefixed by its length, l...e is a list, and d...e is a dictionary.
{"cow": "moo", "spam": "eggs"} becomes d3:cow3:moo4:spam4:eggse, which is legible in the output pane without a decoder.
Sorted keys are part of the format
Bencode is canonical by design. Dictionary keys are sorted as raw byte strings, and a client that hashes the info dictionary to produce an infohash depends on that order being reproducible. Two encoders that disagree on ordering produce two different infohashes for the same torrent.
Keys here are sorted before writing, so re-encoding a decoded structure returns the same bytes.
What cannot be encoded
There is no null, no true, and no 1.5. Torrent metadata works around this: flags are stored as 0 and 1, and there are no floating point fields anywhere in the format. When the encoder stops, it names the path, so $.info.private points straight at the value to change.
Binary values are the other limit. Piece hashes and peer lists are raw bytes, not text, and a JSON source has no way to carry them without a hex or Base64 wrapper that bencode would then store as literal characters.