Inkscape Custom SVG Metadata Extensions Explained
When saving a drawing as a native “Inkscape SVG,” Inkscape embeds
proprietary XML namespaces and metadata directly into the standard SVG
structure to preserve editing state, parametric shapes, and GUI
configurations. This article breaks down the custom namespaces Inkscape
uses—primarily inkscape and sodipodi—and
details the specific attributes, elements, and metadata tags injected
into standard SVG code.
The Custom XML Namespaces
Standard SVG documents adhere to the W3C specification under the
default XML namespace. Inkscape augments this by declaring two primary
custom namespaces in the root <svg> element:
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape": Powers Inkscape-specific features such as layers, Live Path Effects (LPE), snapping rules, and custom transform origins.xmlns:sodipodi="http://www.sodipodi.sourceforge.net/DTD/sodipodi-0.dtd": Inherited from Sodipodi (the software project Inkscape was originally forked from), this namespace primarily manages canvas layout parameters and editable parametric shapes.
In addition to these, Inkscape often references standard metadata
namespaces, including RDF (xmlns:rdf), Dublin Core
(xmlns:dc), and Creative Commons
(xmlns:cc).
Workspace and
Editor State (<sodipodi:namedview>)
Inkscape stores user interface and viewport parameters within a
<sodipodi:namedview> element. This block contains
settings that standard SVG renderers ignore, including:
- Viewport Coordinates:
inkscape:zoom,inkscape:cx, andinkscape:cydefine the canvas zoom level and center coordinates from the last session. - Window Positioning:
inkscape:window-width,inkscape:window-height,inkscape:window-x,inkscape:window-y, andinkscape:window-maximizedtrack the editor’s window geometry. - Display Configurations:
inkscape:pageopacity,inkscape:pageshadow, andbordercolordefine canvas background colors and shadow effects. - Guides and Grids: Contained elements like
<inkscape:grid>and<sodipodi:guide>store user-defined alignment axes, angles, origins, and visibility settings.
Layer Management
SVG specifications do not include a dedicated
<layer> element; all hierarchical grouping is handled
by the standard <g> tag. Inkscape simulates layers by
tagging standard group elements with custom attributes:
inkscape:groupmode="layer": Instructs Inkscape to treat the<g>element as a distinct layer in the Layers panel rather than a standard object group.inkscape:label="Layer Name": Stores the human-readable name assigned to the layer or object.sodipodi:insensitive="true": Denotes locked layers or objects, preventing accidental user selection in the canvas.
Parametric Geometry and Node Metadata
When raw paths are drawn or primitive shapes are created, Inkscape saves the parametric variables necessary to re-edit them later using interactive handles:
- Geometric Primitives (
sodipodi:type): Defines whether an object is a special shape, such assodipodi:type="arc",sodipodi:type="star", orsodipodi:type="spiral". - Shape Variables: Attributes like
sodipodi:cx,sodipodi:cy,sodipodi:rx,sodipodi:ry,sodipodi:start,sodipodi:end,sodipodi:sides, andsodipodi:r1/r2retain the original shape settings before converting the shape to standarddpath data. sodipodi:nodetypes: Appears on standard<path>elements as a string of characters (e.g.,sodipodi:nodetypes="ccsc"). Each character identifies the behavior of a specific path node:c(cusp/corner),s(smooth),z(symmetric), ora(auto-smooth).inkscape:transform-center-xandinkscape:transform-center-y: Define a custom rotational center offset for transformation operations.
Live Path Effects (LPE)
Inkscape’s Live Path Effects perform non-destructive modifications on
paths. Because web browsers only render the computed geometry stored in
the standard d attribute, Inkscape stores the underlying
non-destructive parameters separately:
<inkscape:path-effect>: Defined inside the<defs>section, storing parameters for modifiers such as offsets, power strokes, or fillet/chamfer operations.inkscape:path-effect="#effect-id": Applied directly to a path element to reference its definition in<defs>.inkscape:original-d: Stores the raw, unmodified path coordinates, allowing the user to modify base nodes without losing the applied Live Path Effect.
Standardized Document Metadata
Inkscape includes a <metadata> tag within the root
SVG containing Dublin Core and Creative Commons schemas. This section
commonly contains:
<dc:title>: Document title.<dc:creator>: Author or creator information.<dc:date>: Creation or revision timestamps.<dc:rights>: Copyright conditions.<cc:Work>and<cc:license>: Licensing terms linked to Creative Commons URIs.
Managing Custom Metadata
These extensions ensure full non-destructive editability inside Inkscape without breaking web compatibility, as standard SVG renderers simply ignore unrecognized XML namespaces.
To create smaller, web-optimized files without proprietary tags,
export the file via File > Save As and select
Plain SVG or Optimized SVG, which
strips all inkscape:* and sodipodi:*
extensions while preserving the rendered visual output.