# cantools

> Python 3 library and command-line tool for CAN bus databases that parses DBC, KCD, SYM, ARXML 3/4 and CDD files and encodes and decodes CAN messages, including simple and extended signal multiplexing and diagnostic DIDs. Its CLI decodes candump output against a database, plots decoded signals from candump logs with matplotlib, dumps each message's bit layout, converts between database formats, generates C pack and unpack code, and monitors a live bus in a text interface through python-can.

- Type: Tool
- Targets: Protocol
- Category: Protocol analysis tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-27
- Added to the catalog: 2026-11-03
- Original resource: <https://github.com/cantools/cantools>
- Primary source: <https://github.com/cantools/cantools/blob/5d37340b321c60cbf9b61f2abfad352751f5c835/README.rst>
- Catalog page: <https://awesomerea.org/resources/cantools/>
- Record JSON: <https://awesomerea.org/resources/cantools/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/cantools/index.md)

## Requirements & limits

- Latest release at review: 45.1.0, published 2026-10-20 on GitHub and PyPI; the reviewed master commit is 15 commits ahead of that tag. It installs with pip, and pyproject.toml requires Python 3.10+ with python-can, bitstruct, textparser, crccheck and argparse_addons, plus optional extras for plotting (matplotlib), caching (diskcache) and Windows curses support for the monitor.
- Bring a database describing the target network and frames captured from it: decode reads candump output on standard input and plot reads candump log files, while monitor takes python-can bus arguments for a live interface, and the README's scripting example sends and receives frames on a SocketCAN channel. The repository's tests/files directory holds sample DBC, KCD, SYM, ARXML and CDD databases and generated C sources used by the examples and tests.
- Decoding covers only what the supplied database defines; cantools applies existing message and signal definitions rather than inferring unknown layouts, and the README notes that generated C code is limited to signals of at most 64 bits. MIT licensed.

## Primary sources

1. <https://github.com/cantools/cantools/blob/5d37340b321c60cbf9b61f2abfad352751f5c835/README.rst>
2. <https://github.com/cantools/cantools/blob/5d37340b321c60cbf9b61f2abfad352751f5c835/README.rst#L1-L35>
3. <https://github.com/cantools/cantools/blob/5d37340b321c60cbf9b61f2abfad352751f5c835/README.rst#L83-L130>
4. <https://github.com/cantools/cantools/blob/5d37340b321c60cbf9b61f2abfad352751f5c835/README.rst#L291-L310>
5. <https://github.com/cantools/cantools/blob/5d37340b321c60cbf9b61f2abfad352751f5c835/pyproject.toml>
6. <https://github.com/cantools/cantools/tree/5d37340b321c60cbf9b61f2abfad352751f5c835/src/cantools/subparsers>
7. <https://github.com/cantools/cantools/blob/5d37340b321c60cbf9b61f2abfad352751f5c835/src/cantools/subparsers/monitor.py>
8. <https://github.com/cantools/cantools/tree/5d37340b321c60cbf9b61f2abfad352751f5c835/tests/files>
9. <https://github.com/cantools/cantools/blob/5d37340b321c60cbf9b61f2abfad352751f5c835/LICENSE>
10. <https://github.com/cantools/cantools/releases/tag/45.1.0>
11. <https://pypi.org/project/cantools/45.1.0/>
12. <https://cantools.readthedocs.io/en/latest/>

## More in Protocols

- [inspectrum](https://awesomerea.org/resources/inspectrum/index.md) · Tool
- [PULSAR](https://awesomerea.org/resources/pulsar/index.md) · Tool
- [CanLab](https://awesomerea.org/resources/canlab/index.md) · Tool
- [Facedancer](https://awesomerea.org/resources/facedancer/index.md) · Tool
- [Mirage](https://awesomerea.org/resources/mirage-wireless-framework/index.md) · Tool
- [Protobuf Decoder](https://awesomerea.org/resources/pawitp-protobuf-decoder/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
