TOOL

rdf2graphml

rdf2graphml is a small open-source command-line converter, written mainly in XSLT with a thin Java wrapper, that turns RDF data into GraphML for visualization. It was created by Marco Brattinga (GitHub user "architolk") in 2020 and is distributed under the MIT license. The project is modest in scope and audience, but it fills a specific niche: producing layout-agnostic graph diagrams from semantic-web data that can then be arranged in a dedicated graph editor rather than plotted programmatically.

The pipeline has three stages. Apache Jena (Jena/RIOT) first normalizes any supported RDF serialization — such as Turtle, JSON-LD, or RDF/XML — into RDF/XML. The Saxon XSLT engine then applies stylesheets that transform that RDF/XML into GraphML, the XML-based interchange format defined by the Graph Drawing community. The design deliberately separates graph structure from spatial position: rather than computing coordinates, it emits a topology that downstream GraphML tools such as yEd can lay out with automatic algorithms and interactively rearrange.

Two modes are exposed through a simple two-flag CLI. Data mode (-d) renders the actual triples as a node-and-edge graph, treating resources and literals as vertices and predicates as labeled edges. Model mode (-m) instead reads an RDFS, OWL, or SHACL schema and draws it in a UML/ERD-style class diagram, so classes, properties, and constraints appear as a data model rather than as raw instance data. Both invocations read an input file and write a GraphML file; the tool is built with Maven (mvn clean package).

Its strengths are focus and simplicity: it does one transformation well, accepts multiple RDF syntaxes for free via Jena, and hands off styling and layout to mature GraphML editors instead of reinventing them. The limitations follow from the same minimalism — it is visualization-oriented rather than a general RDF-to-property-graph mapping tool, output styling is tuned toward yEd, and it offers no query, filtering, or round-trip capabilities. For RDF-to-GraphML needs it complements alternatives like graphml2rdf (which goes the other direction) and broader RDF interoperability utilities such as rdf2rdf and RDFLib (Python); users wanting RDF-to-property-graph loading rather than diagramming would look elsewhere.

Input Formats

Output Formats

Frequently Asked Questions

What graph file formats does rdf2graphml support?

See the list on this page — it shows every format rdf2graphml can read, write and display.

How do I import a graph into rdf2graphml?

Convert your file to a format rdf2graphml can read, then open it in rdf2graphml. Use GraphInOut to get a rdf2graphml-compatible file in seconds.

How do I convert a file so rdf2graphml can open it?

Use the convert links above — upload or paste your graph, pick a format rdf2graphml accepts and download the result, right in your browser.