dot2graphml
Convert from any graph formatto dot2graphml Convert from dot2graphmlto any other format
dot2graphml is a small command-line converter that reads Graphviz format:dot files and emits a format:graphml document specifically tailored to yEd, the graph editor from yWorks. It was written in Haskell by Ilya Portnov and published on Hackage under the BSD-3-Clause license, with the last release (0.1.0.2) dating to 2014. The project is a focused single-purpose utility rather than a general library: it ships one executable, dot2graphml, and its source lives on GitHub (portnov/dot2graphml). It builds on the established Haskell graphviz package for DOT parsing and the hxt (Haskell XML Toolbox) for XML generation.
Functionally, the tool sits at the boundary between the two dominant plain-text and XML graph ecosystems. DOT is Graphviz's terse declarative language for describing directed and undirected graphs with node/edge attributes, while GraphML is a verbose XML interchange format widely supported by editors and libraries. Because plain GraphML carries only abstract topology, dot2graphml goes further and injects yWorks' proprietary <y:...> extension elements — the visual "graphics" annotations that let yEd render nodes and edges with real shapes, sizes, colors, and labels rather than as an unstyled diagram. Node labels are extracted from DOT label attributes (handling \n, \l, \r escapes), colors are converted to #RRGGBB hex, nodes become filled ellipses with default dimensions, edges become polylines with arrows, and DOT subgraphs are mapped to yEd group nodes.
Usage is deliberately minimal: it accepts an optional input path and optional output path as positional arguments, defaulting to stdin/stdout, which makes it easy to drop into a shell pipeline. Typical use cases are taking Graphviz output produced by other programs and opening it in yEd for manual layout, cleanup, or presentation.
Its limitations are those of a narrow, unmaintained utility. The attribute mapping is opinionated and partial — it targets yEd's dialect rather than the neutral GraphML consumed by tools like Gephi or tool:networkx, so output may not round-trip elsewhere without adjustment. It covers common label/color/shape cases but does not attempt to preserve the full breadth of Graphviz attributes or layout geometry. For broader or bidirectional needs, more general converters such as tool:graphml2gv (the reverse direction, bundled with Graphviz), tool:graph-easy, or tool:gxl-graphml-xslt are alternatives, and multi-format engines like tool:graphinout cover the same DOT-to-GraphML path within a larger conversion matrix.
Input Formats
Output Formats
Frequently Asked Questions
What graph file formats does dot2graphml support?
See the list on this page — it shows every format dot2graphml can read, write and display.
How do I import a graph into dot2graphml?
Convert your file to a format dot2graphml can read, then open it in dot2graphml. Use GraphInOut to get a dot2graphml-compatible file in seconds.
How do I convert a file so dot2graphml can open it?
Use the convert links above — upload or paste your graph, pick a format dot2graphml accepts and download the result, right in your browser.
