julienschmidt

    julienschmidt/httprouter

    A high performance HTTP request router that scales well

    17.1K stars
    1.5K forks
    303 GitHub watchers
    Updated Nov 9, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    The project lists 50 contributors on GitHub.

    Use Cases & Benefits

    • Provides a high performance HTTP request router for Go that supports variables in routes and method-based matching.
    • Delivers efficient routing with zero garbage allocations and automatic path correction, ensuring fast and scalable request handling.
    • Use for building scalable RESTful APIs with hierarchical routes and native support for OPTIONS and method not allowed responses.
    • Use for serving multiple domains or subdomains by combining routers with custom host-based handlers.
    • Use for implementing secure endpoints with middleware like Basic Authentication integrated into route handlers.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    BSD 3-Clause

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present

    Watch-outs

    • Warning: No commits in over a year (last push Jul 2024).

    General guidance from repository metadata, not legal advice. How we score

    From the README

    HttpRouter is a lightweight high performance HTTP request router (also called multiplexer or just mux for short) for Go.

    In contrast to the default mux of Go's net/http package, this router supports variables in the routing pattern and matches against the request method. It also scales better.

    The router is optimized for high performance and a small memory footprint. It scales well even with very long paths and a large number of routes. A compressing dynamic trie (radix tree) structure is used for efficient matching.

    Only explicit matches: With other routers, like http.ServeMux, a requested URL path could match multiple patterns. Therefore they have some awkward pattern priority rules, like longest match or first registered, first matched. By design of this router, a request can only match exactly one or no route. As a result, there are also no unintended matches, which makes it great for SEO and improves the user experience.

    Stop caring about trailing slashes: Choose the URL style you like, the router automatically redirects the client if a trailing slash is missing or if there is one extra. Of course it only does so, if the new path has a handler. If you don't like it, you can turn off this behavior.

    Excerpt from the julienschmidt/httprouter README on GitHub (BSD-3-Clause license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    1.5K+0

    Open issues

    87+3

    Compared with peers in Networking

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, by 7-day star growth

    julienschmidt/httprouter compared with Networking repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    MHSanaei/3x-ui49.6K+44852137 days ago
    GyulyVGC/sniffnet42.3K+42275111 days ago
    tailscale/tailscale38.9K+31175today
    netbirdio/netbird30.9K+26775today
    fosrl/pangolin23.6K+218756 days ago
    julienschmidt/httprouter17.1K—35—
    Category median38.9K+31175—

    Discover Repositories

    Search across tracked repositories by name or description