Bencode кодировщик / Декодер

ДанныеРазработчик
РЕКЛАМА · УДАЛЯТЬ?

Или
РЕКЛАМА · УДАЛЯТЬ?

Гид

Bencode Encoder / Decoder

Bencode кодировщик / Декодер

Encode JSON to Bencode format or decode Bencode back to JSON instantly. Bencode is the serialisation format used by BitTorrent for .torrent files and the DHT protocol. Paste Bencode input to decode it into readable JSON, or paste JSON to encode it into compact Bencode — all client-side with no data transmitted.

Как использовать

Select your direction (Bencode → JSON or JSON → Bencode), paste your input, and the result appears instantly. Use the built-in example to see a real .torrent file structure decoded into JSON.

Функции

  • Двунаправленное преобразование – Bencode to JSON and JSON to Bencode
  • Full type support – integers, byte strings, lists, and dictionaries
  • Пример предустановки – real .torrent file structure for reference
  • Real-time output – converts as you type
  • Только на стороне клиента – ваши данные никогда не покидают браузер

РЕКЛАМА · УДАЛЯТЬ?

Часто задаваемые вопросы

  1. What is Bencode and why does BitTorrent use it?

    Bencode is a simple serialisation format designed for BitTorrent by Bram Cohen. It encodes four types: byte strings (4:spam), integers (i42e), lists (l...e), and dictionaries (d...e). BitTorrent uses it for .torrent metainfo files and DHT messages because it is unambiguous (no encoding ambiguity like JSON has for numbers), compact, and trivial to parse in any language without a library.

  2. How does Bencode encode different data types?

    Bencode encodes integers as ie (e.g., i42e), byte strings as : (e.g., 4:spam), lists as le, and dictionaries as de where keys must be byte strings in sorted order. Nesting is supported arbitrarily. There is no native boolean or float type — booleans are represented as integers (0/1) and floats are typically stored as strings.

  3. What information is inside a .torrent file?

    A .torrent file is a Bencoded dictionary containing: the announce URL of the tracker, an info dictionary with the torrent name, piece length, SHA-1 hashes of all pieces, and either a single file length or a list of files with paths and lengths. Optional fields include announce-list (backup trackers), creation date, comment, and created-by. Magnet links encode a subset of this as a URI.

  4. Can Bencode handle binary data?

    Yes. Bencode byte strings are raw binary sequences prefixed with their byte length. This is why .torrent files store SHA-1 piece hashes as raw 20-byte binary strings rather than hex. When converting Bencode to JSON, binary strings are typically represented as hex or Base64 since JSON has no native binary type.

Хотите убрать рекламу? Откажитесь от рекламы сегодня

Установите наши расширения

Добавьте инструменты ввода-вывода в свой любимый браузер для мгновенного доступа и более быстрого поиска

в Расширение Chrome в Расширение края в Расширение Firefox в Расширение Opera

Табло результатов прибыло!

Табло результатов — это интересный способ следить за вашими играми, все данные хранятся в вашем браузере. Скоро появятся новые функции!

РЕКЛАМА · УДАЛЯТЬ?
РЕКЛАМА · УДАЛЯТЬ?
РЕКЛАМА · УДАЛЯТЬ?

новости с техническими моментами

Примите участие

Помогите нам продолжать предоставлять ценные бесплатные инструменты

Купи мне кофе
РЕКЛАМА · УДАЛЯТЬ?