iOS & macOS syntax highlighter built with Swift, using highlight.js to support 185 languages and 89 styles.
Highlightr is an iOS and macOS syntax highlighter built with Swift that uses highlight.js to convert plain code strings into formatted NSAttributedString objects. It supports 185 programming languages and 89 visual styles, enabling developers to add syntax highlighting to text editors, code viewers, or any app displaying code. The project solves the need for a ready-to-use, multi-language syntax highlighter within Apple's ecosystem without requiring native parsing implementations.
iOS and macOS developers building applications that display or edit code, such as code editors, documentation tools, educational apps, or developer utilities. It's particularly useful for those who need broad language support and customizable themes without implementing highlighting from scratch.
Developers choose Highlightr because it leverages the widely-used highlight.js library, providing extensive language support and theme variety out of the box. Its integration with Swift and Apple's JavaScriptCore ensures decent performance for real-time editing, while its simple API makes it easy to add syntax highlighting to existing projects.
iOS & OSX Syntax Highlighter.
Supports 185 programming languages by leveraging highlight.js, eliminating the need to implement custom parsers for each language, as stated in the README.
Comes with 89 pre-built visual styles, allowing developers to easily customize syntax highlighting appearance without creating themes from scratch.
Provides CodeAttributedString, a subclass of NSTextStorage, enabling live syntax highlighting in text editors, which is ideal for interactive coding apps.
Can detect the programming language from code strings if not specified, simplifying integration for dynamic or user-submitted code snippets.
Offers a straightforward API to convert plain strings to NSAttributedString objects with minimal setup, using Swift Package Manager for installation.
As of 2026, Highlightr is no longer actively maintained, with the author recommending HighlighterSwift instead, posing risks for bug fixes and compatibility updates.
Relies on JavaScriptCore to run highlight.js, which is slower than native Swift parsers and adds runtime dependency, as admitted in the README's performance section.
The bundled highlight.js library is static and not updated, potentially missing new languages, features, or security patches from the upstream project.
Lacks active community support, and documentation is hosted on Cocoadocs which may not be current, making troubleshooting difficult for new issues.
Powerful text framework for iOS to display and edit rich text.
A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.
A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view
Beautiful, easy attributed strings in Swift
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.