Ox VS Nokogiri

Compare Ox vs Nokogiri and see what are their differences.


Ruby Optimized XML Parser (by ohler55)


Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. (by sparklemotion)
Our great sponsors
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • SaaSHub - Software Alternatives and Reviews
Ox Nokogiri
1 19
868 6,080
- 0.2%
0.0 9.2
3 months ago 8 days ago
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of Ox. We have used some of these posts to build our list of alternatives and similar projects.

We haven't tracked posts mentioning Ox yet.
Tracking mentions began in Dec 2020.


Posts with mentions or reviews of Nokogiri. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-05.
  • Did you know Nokogiri now has opt-in HTML5 parsing?
    7 projects | /r/ruby | 5 Jun 2023
    I hadn't noticed that Nokogiri added opt-in HTML5 parsing recently. Looks like... based on CHANGELOG it looks like maybe pretty recently indeed, 1.15.0 @ 2023-05-15 ?
    7 projects | /r/ruby | 5 Jun 2023
    release planning: v1.16.0 · Issue #2897 · sparklemotion/nokogiri
    7 projects | /r/ruby | 5 Jun 2023
    RFC: Explore alternatives to libxml2 for HTML parsing · Issue #2064 · sparklemotion/nokogiri, the original discussion that ended with the decision to merge Nokogumbo into Nokogiri
  • As a Go developer, I’m surprised Crystal isn’t more popular
    8 projects | /r/crystal_programming | 26 May 2023
    What's holding me back from going all in with Crystal is I have a lot of pre-existing Ruby code, and porting Ruby code to Crystal can be tricky. For example, Crystal lacks an Enumerator class (aka generators) due to captured block semantics. I also wish the shards ecosystem was a little more mature; for example there's multiple HTML parsing libraries, but none have all of the features that Ruby's Nokogiri has. For new greenfield backend projects, I would totally use Crystal.
  • Two months into learning Ruby, it is the most beautiful language I ever learned
    5 projects | /r/ruby | 25 Feb 2023
    Welcome! Ruby isn't exactly "dying", but the hype/popularity is definitely fading. This is primarily because Ruby is no longer "new", most of Ruby's popularity came from Rails, and now Rails is no longer the "new hotness". However, Ruby still has lots of awesome features and lots of awesome other libraries and frameworks, such as the new fancy irb gem that uses reline, nokogiri, chunky_png, the async gems, Dragon Ruby, SciRuby, Ronin, and the new Hanami web framework.
  • What should I be learning?
    3 projects | /r/ruby | 25 Oct 2022
  • Ditch Your Version Manager
    18 projects | news.ycombinator.com | 19 Sep 2021
    Mike has worked hard over the years to have Nokogiri come with its dependencies. It does come with libxml and all that is required.

    From https://nokogiri.org

    > These dependencies are met by default by Nokogiri's packaged versions of the libxml2 and libxslt source code, but a configuration option --use-system-libraries is provided to allow specification of alternative library locations.

    Some authors work hard to have their tools do the right thing and consistently.

  • Web scraping with rails
    7 projects | /r/rails | 16 Sep 2021
    If the page is rendered as html you can use Nokogiri. It has great support and is pretty easy to get started with too.
  • My favorite Ruby gems
    3 projects | /r/ruby | 28 May 2021
  • Best of (Ruby) Gems Series - What's Next? What's Hot?
    19 projects | /r/ruby | 12 Mar 2021
    About the C-extensions, I'd be curious on what it takes to build extensions using C, and a study around how nokogiri solved the yearlong issue of install-then-compile by shipping arch-based precompiled binaries, and how this should become more of a standard in the ruby community for gems requiring extensions.

What are some alternatives?

When comparing Ox and Nokogiri you can also consider the following projects:

Oga - Oga is an XML/HTML parser written in Ruby.

HTML::Pipeline - HTML processing filters and utilities

Oj - Optimized JSON

ROXML - ROXML is a module for binding Ruby classes to XML. It supports custom mapping and bidirectional marshalling between Ruby and XML using annotation-style class methods, via Nokogiri or LibXML.

HappyMapper - Object to XML mapping library, using Nokogiri (Fork from John Nunemaker's Happymapper)

Sablon - Ruby Document Template Processor based on docx templates and Mail Merge fields.

rubygems - Library packaging and distribution for Ruby.