Lexbor is development of an open source HTML Renderer library. https://lexbor.com
Lexbor is development of an open source HTML Renderer library. https://lexbor.com
Crafting a Browser Engine with Simplicity and Flexibility.
Lexbor is still in development, but the existing modules are already production-ready.
A set of fast, standards-compliant tools (modules) for working with modern web technologies — HTML parsing, CSS processing, URL handling, and more. These modules are production-ready today and form the foundation of a browser engine in development.
| Module | Status | Description |
|---|---|---|
| DOM | ✅ Ready | DOM tree manipulation |
| HTML | ✅ Ready | Full HTML parser |
| CSS | ✅ Ready | CSS parsing, CSSOM, Selectors |
| URL | ✅ Ready | URL parsing |
| Encoding | ✅ Ready | 40+ encodings support |
| Unicode | ✅ Ready | Normalization, IDNA |
| Punycode | ✅ Ready | IDN encode/decode |
| Layout | In progress | — |
| Fonts | In progress | — |
| and more | In progress | — |
More bindings available for Elixir, Crystal, D, Julia, Erlang.
<style> tag.Documentation: https://lexbor.com/modules/html/.
Documentation: https://lexbor.com/modules/css/.
Documentation: https://lexbor.com/modules/selectors/.
40 encodings for encode/decode.Documentation: https://lexbor.com/modules/encoding/.
Documentation: https://lexbor.com/modules/url/.
Documentation: https://lexbor.com/modules/unicode/.
Binaries are available for:
Currently for x86_64 architecture.
If you need any other architecture, please, write to [email protected].
For vcpkg users there is a lexbor port that can be installed via vcpkg install lexbor or by adding it to dependencies section of your vcpkg.json file.
To install lexbor on macOS from Homebrew:
brew install lexbor
To install lexbor on macOS from MacPorts:
sudo port install lexbor
For building and installing Lexbor library from source code, use CMake (open-source, cross-platform build system).
cmake . -DLEXBOR_BUILD_TESTS=ON -DLEXBOR_BUILD_EXAMPLES=ON
make
make test
Please, see more information in documentation.
Lexbor can be built as a single-header/single-source amalgamation for easy integration into your project without managing multiple files or dependencies.
The amalgamation combines all selected modules and their dependencies into one .h file, making it simple to drop into any C/C++ project.
Use the single.pl script to generate an amalgamated version:
# Generate amalgamation with all modules
perl single.pl --all > lexbor_single.h
# Generate amalgamation for specific modules
perl single.pl html css > lexbor_html_css_single.h
# Generate with exported symbols (for dynamic linking)
perl single.pl --with-export-symbols html > lexbor_html_single.h
# Use a different port (default: posix)
perl single.pl --port=windows_nt html > lexbor_html_single.h
Once generated, simply include the amalgamated file in your project:
#include "lexbor_single.h"
int
main(void)
{
/* Your code using Lexbor. */
return 0;
}
Compile without any additional dependencies:
gcc -o myapp myapp.c lexbor_single.h
Documentation: https://lexbor.com/amalgamation/.
If you only need an HTML parser, use liblexbor-html.
Separate modules may depend on each other.
For example, dependencies for liblexbor-html: liblexbor-core, liblexbor-dom, liblexbor-tag, liblexbor-ns.
The liblexbor-html library already contains all the pointers to the required dependencies. Just include it in the assembly: gcc program.c -llexbor-html.
You can create a binding or wrapper for the lexbor and place the link here!
Lexbor draws a clear line between its core library and the surrounding ecosystem.
Core library — all source code that compiles into the distributable binary — is written entirely by humans. This is an engineering choice, not an ideological one. Lexbor is a performance-critical, standards-compliant C library where every line of code must reflect a decision its author fully understands and can defend. We use AI tools in other areas of the project and see their value clearly; the core is simply not the right place for them.
AI-assisted tools are welcome and actively used for bindings, WASM builds, benchmarks, documentation, examples, tests, and other supporting work. This section is one such example — it was drafted with AI and reviewed by a human. The em dashes are a giveaway.
For contributors: pull requests targeting core library code are expected to be human-authored. The contributor — not an AI model — performed the reasoning, made the design choices, and wrote the code. The code you submit is yours, and you can speak to the intent and correctness of every line. We are not interested in policing workflows, but if a pull request reads like AI did the thinking, it will likely be rejected.
Available on lexbor.com in Documentation section.
Please, see roadmap on lexbor.com.
You can help sponsor the maintainers of this software through the following organization: github.com/sponsors/toxypi
PVS-Studio - static analyzer for C, C++, C#, and Java code.
These are third-party distributions; we do not create them. Thank you to the community.
Lexbor.
Copyright 2018-2026 Alexander Borisov
Licensed under the Apache License, Version 2.0 (the "License")
No open issues yet, or sync has not completed.