# Botanical-name: a small open-source parser for plant names (PHP + JavaScript)

**URL:** <https://discourse.gbif.org/t/botanical-name-a-small-open-source-parser-for-plant-names-php-javascript/6454>\
**Category:** Data Use\
**Created:** [October 5, 2026, 1:38pm UTC](https://discourse.gbif.org/t/botanical-name-a-small-open-source-parser-for-plant-names-php-javascript/6454 "2026-10-05T13:38:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlantGeekz](https://sea1.discourse-cdn.com/gbif1/user_avatar/discourse.gbif.org/plantgeekz/32/1239_2.png) [@PlantGeekz](https://discourse.gbif.org/u/PlantGeekz)\
**Post date:** [October 5, 2026, 1:38pm UTC](https://discourse.gbif.org/t/botanical-name-a-small-open-source-parser-for-plant-names-php-javascript/6454/1 "2026-10-05T13:38:57Z")

</div>

Hi all,

We have released **botanical-name** , an MIT-licensed library that parses, normalizes and formats botanical names: hybrids, infraspecific ranks, authors, cultivars, cultivar groups and trade designations. It is available for PHP and for JavaScript/TypeScript, and both versions run the same test fixtures and give identical output.

It grew out of a practical problem at PlantGeekz, a plant identification app built on the GBIF and Catalogue of Life backbones. Names arrive as `hydrangea x macrophylla ssp. serrata cv. Bluebird`, and most websites italicize the whole name. The library turns that into _Hydrangea_ ×_macrophylla_ subsp. _serrata_ ‘Bluebird’, with italics only where ICN and ICNCP put them. It also gives a comparison key for matching names spelled in different ways, and it reports every change it made.

It is not a replacement for GBIF’s name-parser or gnparser. It is a structural parser for web projects that have no JVM or Go toolchain, and it never looks names up. Before release we ran it on 30,569 real names, and the PHP and JS results were identical.

- Try it in the browser, with docs: [https://plantgeekz.com/open-source](https://plantgeekz.com/open-source)
- PHP: [https://github.com/plantgeekz/botanical-name-php](https://github.com/plantgeekz/botanical-name-php) (DOI 10.5281/zenodo.22765110)
- JS: [https://github.com/plantgeekz/botanical-name-js](https://github.com/plantgeekz/botanical-name-js) (DOI 10.5281/zenodo.22765112)

Feedback is very welcome, especially names it gets wrong.

Rasmus, PlantGeekz (Copenhagen)
