---
name: "gv2gml"
section: "1"
platform: "linux"
package: "graphviz"
version: "16.1.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gml2gv"
---

# gv2gml(1)

GML-DOT converters

Part of [gml2gv(1)](/gml2gv/1.md).

## NAME

gml2gv,gv2gml - GML-DOT converters

## SYNOPSIS

**gml2gv** \[ **-?v** \] \[ **-g***gname* \] \[ **-o***outfile* \] \[  *files* \]\
 **gv2gml** \[ **-y** \] \[ **-?** \] \[ **-o***outfile* \] \[  *files* \]

## DESCRIPTION

**gml2gv** converts a graph specified in the GML format to a graph in the GV (formerly DOT) format.  **gv2gml** converts a graph specified in the GV format to a graph in the GML format.

## OPTIONS

The following options are supported:

- **-v**

  Turns on verbose mode

- **-y**

  Uses attributes according to yWorks.com documentation instead of the GML specification.

- **-?**

  Prints usage information and exits.

- **-g***gname*

  The string *gname* is used as the name of the generated graph. If multiple graphs are generated, subsequent graphs use the name *gname* appended with an integer.

- **-o***outfile*

  Prints output to the file *outfile*. If not given, **gml2gv** uses stdout.

- The following operand is supported:

  ## OPERANDS

- *files*

  Names of files containing 1 or more graphs in GML. If no *files* operand is specified, the standard input will be used.

## RETURN CODES

Return **0** if there were no problems during conversion; and non-zero if any error occurred.

## LIMITATIONS

As both the graph and graphics models of GV and GML differ significantly, the conversion is at best approximate. In particular, it is not clear how multiedges are differentiated in GML, so multiedges are created in GV with no user-available key. Also, no attribute information is lost, in that any GML attributes that aren't converted to GV equivalents are retained as attributes in the output graph.

At present,  **gv2gml** does not support subgraphs and clusters. In addition, there does not appear to be a standard mechanism for specifying default node and edge attributes in GML, so any attributes are repeated for every node and edge.

## AUTHORS

Emden R. Gansner \<erg@research.att.com\>

## SEE ALSO

[dot(1)](/dot/1.md), libcgraph(3)
