Emergency server help: get in touch

BGP AS Path Parser and AS-Path Regex Tester

Paste a BGP AS path to see its length as best-path selection counts it, prepending, loops, AS_SET and confederation segments, private and reserved ASNs, asdot conversion, and test Cisco as-path regular expressions.

Where it runs
Runs in your browser
Last updated
October 12, 2026

This BGP AS path parser breaks an AS path into its segments and ASNs, counts the length the way best-path selection does, and flags prepending, loops and private or reserved ASNs. It runs entirely in your browser: nothing you type is sent to our server.

Loading the tool… It runs in your browser and needs JavaScript.

How the length is counted

  • Each ASN in an AS_SEQUENCE counts 1, including repeated (prepended) ASNs.
  • An AS_SET { } counts 1 no matter how many ASNs it holds. RFC 9774 (2025) deprecates AS_SETs.
  • Confederation segments ( ) count 0.

ASN ranges to watch

RangeMeaning
64512-65534, 4200000000-4294967294Private (RFC 6996): must not appear on the internet
64496-64511, 65536-65551Documentation (RFC 5398)
23456AS_TRANS: a 4-byte ASN seen by an old 2-byte speaker
0, 65535, 4294967295Reserved

as-path regular expressions

Cisco as-path regexes use _ for a delimiter (space, start, end, braces or comma). ^65001_ matches routes received from AS65001, _174$ routes originated by AS174, ^$ routes originated in your own AS. Test them here before using them in ip as-path access-list.

How we checked it

We tested the parser on 11-12 October 2026 with paths containing prepends, an AS_SET, a confederation segment, a loop and asdot ASNs, and checked the regex tester with start, end and middle-of-path patterns.

Frequently asked questions

How is AS path length calculated in BGP?

Each ASN in the sequence counts one, including prepends; an AS_SET counts one; confederation segments count zero.

What is AS path prepending?

Adding your own ASN several times to make a path look longer, so other networks prefer another path to you.

How do I convert asdot to asplain?

Multiply the part before the dot by 65,536 and add the part after it: 1.10 = 65,546.

Share this tool

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.