WAN IPv4 Addresses
| IP Address |
|---|
LAN IPv4 Addresses
| IP Address |
|---|
IPv6 Addresses
| IP Address |
|---|
Extract Unique IPv4 and IPv6 Addresses from Any Text
Extract Unique IPv4 and IPv6 Addresses from Any Text
This calculator is designed for engineers, administrators, and security analysts who need to quickly scan raw text for unique IP addresses. By pasting log files, configuration snippets, or any unstructured content into the tool, you can instantly extract all distinct IPv4 and IPv6 addresses and review them in structured, filterable tables.
Why Unique IP Extraction Matters
Log files often contain repeated occurrences of the same IP address. When you are troubleshooting connectivity, analyzing suspicious behavior, or mapping traffic patterns, you typically care about the set of unique endpoints rather than every single occurrence. Mathematically, if \( S \) is the set of all IP occurrences in the text and \( U \) is the set of unique IPs, then:
\[ U = \{ x \in S \mid x \text{ appears at least once in the text} \} \]
The calculator effectively computes the cardinality \( \lvert U \rvert \) and also tracks how many times each address appears, giving you both coverage and frequency information.
How the Calculator Processes IPv4 Addresses
IPv4 addresses are detected using a strict pattern that matches four decimal octets in the range 0 to 255. For every IPv4 match, the calculator:
- Counts how many times that exact address appears in the text.
- Determines whether the address belongs to a private range, such as \( 10.0.0.0/8 \), \( 172.16.0.0/12 \), or \( 192.168.0.0/16 \).
- Records the first character index at which the address appears in the input.
The results are summarized in a dedicated IPv4 table where you can sort and export the data for further analysis.
How the Calculator Processes IPv6 Addresses
IPv6 addresses are more complex, with hexadecimal groups, optional compression, and different scope types. The calculator uses a flexible pattern that covers common global, unique local, and link-local formats. Each IPv6 address is classified into a scope such as:
- Link-Local addresses (for example, \( \text{fe80::/10} \)) that are only valid on a local link.
- Unique Local addresses (typically \( \text{fc00::/7} \)) used inside private networks.
- Global Unicast addresses that can be routed on the public Internet.
Just like IPv4, the tool counts occurrences and tracks where each IPv6 address first appears in the text.
Filtering by Minimum Occurrences
Not every address in a log is equally important. Sometimes you want to focus on IPs that appear repeatedly, because they may represent persistent clients, noisy scanners, or active threats. The calculator lets you specify a minimum occurrence threshold \( n \). Only addresses with at least \( n \) occurrences are kept:
\[ U_n = \{ x \in U \mid \text{occurrences}(x) \geq n \} \]
This helps you quickly zoom in on the most relevant and most active endpoints.
Using DataTables for Interactive Analysis
Both the IPv4 and IPv6 result sets are displayed in separate tables powered by DataTables. You can:
- Search for specific IP strings or partial patterns.
- Sort by occurrence count, address type, or first position in the text.
- Export the currently visible columns to CSV or Excel for offline processing.
The calculator also provides a Customize Columns feature, allowing you to toggle columns on or off and reorder them to match your preferred workflow.
Practical Use Cases
This IP extraction tool is useful in several scenarios:
- Security Incident Response when you need a quick list of suspicious IPs from firewall or IDS logs.
- Network Troubleshooting to identify which clients have been repeatedly connecting to a specific service.
- Compliance and Auditing to document which external addresses were seen during a given time window.
By isolating unique IPv4 and IPv6 addresses and displaying them clearly, the calculator saves time and reduces manual parsing errors.
Interpreting the Summary Cards
At the top of the results section, three summary cards show the total number of unique IP addresses, and the split between IPv4 and IPv6. These values provide a quick snapshot of the dataset. If you change the minimum occurrence threshold or paste a different input, the summary and tables are recalculated so you always see up to date information.