How do I convert Natspec into something that a human can easily read?

Eg: HTML, Markdown, .PDF

3 Answers 3


This appears to generate HTML documentation directly from your natspec'd code:


  • Unfortunately this library is no longer maintained and support for the latest version of Solidity is not present.
    – Cliff Hall
    Commented Nov 11, 2019 at 17:09

As per the User Documentation on the Natspec page, the output is just a JSON blob.

You could feed this JSON output into a conversion tool, e.g.:


I have released a plugin for Hardhat which generates a Vue static site from NatSpec comments: https://github.com/ItsNickBarry/hardhat-docgen

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.