Nannostomus marginatus, commonly known as the dwarf pencilfish, is a freshwater species of fish belonging to the genus Nannostomus in the Lebiasinidae family of characins. They were first described in 1909 by C. H. Eigenmann and are typical of members of this genus being small, elongated fish with prominent horizontal stripes. The most notable feature of N. marginatus is its size, it being one of the smallest members of the genus, only reaching a maximum size of 35 mm. They occur widely on the South American continent having been recorded in Brazil, Guyana, Colombia, Suriname, and Peru.