# PageHelper

> Pagination plugin for MyBatis that pages any single-table or multi-table query

Source: https://talira.ai/catalog/pagehelper-1r79gm8s
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Plugin
- Categories: [libraries / databases / orm](https://talira.ai/categories/libraries/databases/orm), [languages / java](https://talira.ai/categories/languages/java)
- Licence: MIT[^3]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [abel533](https://talira.ai/orgs/abel533.md)

PageHelper is a pagination plugin for [MyBatis](https://talira.ai/catalog/mybatis-ba3d1sm1.md) 3.1.0 and later: call it before a query and it rewrites the SQL for physical paging in the database's own dialect, for single-table and complex multi-table queries alike. It detects dialects for MySQL, MariaDB, PostgreSQL, Oracle, SQL Server, DB2, SQLite, H2, Informix and others. PageHelper 6 needs JDK 8 or later.

## Links

- Website: https://pagehelper.github.io/
- GitHub: https://github.com/pagehelper-org/Mybatis-PageHelper
- Docs: https://github.com/pagehelper-org/Mybatis-PageHelper/blob/master/wikis/en/HowToUse.md

## Problems it solves

- I need to paginate MyBatis queries without writing LIMIT and COUNT SQL by hand for each database
- My Java app's MyBatis mappers need paging that works on both MySQL and Oracle
- I want page numbers and total counts for MyBatis list queries

## Features

- Physical pagination for any single-table or multi-table MyBatis query
- Automatic dialects for MySQL, MariaDB, PostgreSQL, Oracle, SQL Server, DB2, SQLite, H2 and more
- Works with MyBatis 3.1.0 and later; PageHelper 6 needs JDK 8+, PageHelper 5 JDK 6+

## Limitations

- Some special cases of queries need care, listed in its 'Important note' page.[^1]
- Most of its docs and site are in Chinese.[^2]

## Trust

Overall: 0.50 out of 1.
Signals: maintenance 0.47, adoption 0.82, momentum 0.58, community 0.70, backing 0.30, extensibility 0.00.

- last commit 53 days ago
- 3 commits in the last 90 days
- latest release v6.1.1 17 months ago
- 12.3k GitHub stars
- 56 contributors
- accepts sponsorship (Liberapay, Custom)
- backed by abel533

## Related

- Works with [MyBatis](https://talira.ai/catalog/mybatis-ba3d1sm1.md)

## Alternatives

- [MyBatis-Plus](https://talira.ai/catalog/mybatis-plus-v9nj19jm.md): Enhancement toolkit for MyBatis that cuts boilerplate in Java data access
- [MyBatis](https://talira.ai/catalog/mybatis-ba3d1sm1.md): SQL mapper persistence framework for Java

## Sources

[^1]: https://github.com/pagehelper-org/Mybatis-PageHelper/blob/master/README_en.md (checked 30 Nov 2026)
[^2]: https://github.com/pagehelper-org/Mybatis-PageHelper/blob/master/README.md (checked 30 Nov 2026)
[^3]: https://github.com/pagehelper-org/Mybatis-PageHelper/blob/master/LICENSE (checked 30 Nov 2026)
