Undirected circuit
odd-degree vertices = 0
Every non-isolated vertex must also belong to one connected component.
Private by design: graph data is processed on this device. It is not uploaded, saved, or added to the page URL.
An Euler trail uses every edge exactly once. A closed Euler trail is an Euler circuit; an open Euler trail is commonly called an Euler path. Vertices may be visited more than once. That is the key difference from a Hamiltonian path, which concerns visiting vertices.
odd-degree vertices = 0
Every non-isolated vertex must also belong to one connected component.
odd-degree vertices = 2
The two odd vertices are forced to be the path's start and end.
out(v) − in(v) ∈ {−1, 0, 1}
A circuit is balanced everywhere; an open path has one +1 start and one −1 end.
For directed graphs, vertices incident to edges must be connected after edge directions are ignored. Combined with the displayed indegree/outdegree conditions, this is sufficient for the tool's directed Euler test.
Use an odd-degree endpoint or +1 imbalance when an open path exists. Otherwise begin at any vertex incident to an edge.
Move along unused edges, marking each edge by its unique input-line ID. Parallel edges therefore remain distinct.
When the current vertex has no unused edge, add it to the completed route and return to the previous vertex.
Backtracking builds the answer in reverse. Reversing it produces a trail containing exactly |E| + 1 vertex visits.
The algorithm runs in O(|V| + |E|) time with adjacency lists. The finder keeps every edge line as a separately identifiable edge, including repeated endpoint pairs and self-loops.
The sample undirected graph has edges A–B, B–C, C–D, D–A, A–C, C–A. The final two lines are parallel edges between A and C. Degrees are deg(A)=4, deg(B)=2, deg(C)=4, and deg(D)=2.
All degrees are even and every vertex with an edge is connected, so an Euler circuit exists. One valid answer is A → B → C → D → A → C → A. The repeated A–C pair appears twice because those two input lines represent two different edges.
Vertex labels are case-sensitive text. The optional vertex field accepts commas, semicolons, or line breaks. Edge endpoints are detected automatically, but isolated vertices must be listed explicitly. Labels may contain spaces but cannot contain commas, semicolons, arrows, or line breaks.
For an undirected graph, enter each edge as A,B. For a directed graph, use A -> B, A → B, or A,B; the first endpoint is the start and the second is the end. Every nonempty line is an edge, so repeated lines are retained as parallel edges. Self-loops are valid. An undirected self-loop contributes two to degree; a directed self-loop contributes one to both indegree and outdegree.
Isolated vertices do not affect whether the edges have an Euler trail. If the graph has no edges, the tool reports a trivial zero-edge circuit at the first listed vertex. The constructed route is deterministic and follows vertex and edge input order, but a graph may have many other valid Euler trails.
The finder accepts up to 500 vertices, 20,000 nonempty edge lines, 20,000 edges, and labels up to 80 characters. The on-page traversal table is capped at 2,000 steps to protect rendering performance; copy and CSV export retain the full calculated trail.
Terminology follows the U.S. National Institute of Standards and Technology's Euler cycle, path, and graph entries. The construction uses Hierholzer's edge-splicing method in an iterative backtracking form.
Calculation note: undirected and directed circuits, open paths, disconnected graphs, isolated vertices, parallel edges, self-loops, degree failures, empty inputs, and export fields checked by the Starlight Tools editorial team. Last reviewed: .
Both traverse every edge exactly once. An Euler circuit returns to its starting vertex. An open Euler path starts and ends at different vertices. Vertices can appear more than once in either trail.
Ignoring isolated vertices, all vertices with edges must be connected. Zero odd-degree vertices gives a circuit; exactly two odd-degree vertices gives an open path; any other number gives neither.
The edge-bearing vertices must be connected when directions are ignored. A circuit requires equal indegree and outdegree at each vertex. An open path requires one vertex with one extra outgoing edge, one with one extra incoming edge, and balance everywhere else.
Yes. Each line is a separate edge, so repeated lines are parallel edges rather than duplicates to remove. Self-loops are kept and can be part of a valid Euler trail.
No. An Euler trail covers edges, so connectivity is tested only among vertices incident to an edge. Isolated vertices are included in the degree table but do not break an otherwise valid trail.
Euler trails are often not unique. This finder chooses the first available edge in input order. A different valid edge choice can produce a different trail with the same classification.
No. The graph is parsed and analyzed in your browser. Copying and CSV creation also happen locally, and this tool does not save entered vertices or edges.