Smart contracts (SCs) are software systems that monitor and partially control the execution of legal contracts to ensure compliance with the contracts’ terms and conditions, which essentially are sets of obligations and powers, triggered by events. Such systems often exploit Internet-of-Things technologies to support their monitoring functions and blockchain technology to ensure the integrity of their data. Enterprise-level blockchain platforms (such as Hyperledger Fabric) and public ones (such as Ethereum) are popular choices for SC development. However, usually, legal experts are not able to directly encode contract requirements into SCs. Symboleo is a formal specification language for legal contracts that was introduced to address this issue. Symboleo uses an ontology that defines legal concepts such as parties, obligations, powers, and assets, with semantics expressed with state machines. This paper proposes a tool that automatically translates Symboleo specifications into smart contract code for Hyperledger Fabric. Towards this end, we have extended the current Symboleo IDE, implemented the ontology and semantics by using the modelling language Umple, and created a reusable library. The resulting Symboleo2SC tool generates Hyperledger Fabric code exploiting this library. This code is a complete translation and does not require further development. Symboleo2SC was evaluated with five sample contracts. These were converted to SCs for contract monitoring and control purposes. Symboleo2SC helps simplify the SC development process, saves development effort, and helps reduce risks of coding errors.