What is the SLD file format?
An .sld file is an XML document conforming to the Open Geospatial Consortium (OGC) Styled Layer Descriptor standard, which specifies how geographic features on a map should be rendered - controlling colors, line widths, fill patterns, label styles, and symbol shapes for points, lines, polygons, and raster layers. SLD is an open, vendor-neutral standard, allowing any compliant GIS server or client to exchange .sld files and produce consistent cartographic output.
The root XML element is <StyledLayerDescriptor> with the OGC namespace. Inside, <NamedLayer> or <UserLayer> elements group one or more <FeatureTypeStyle> blocks, each containing <Rule> elements. Rules combine attribute filters with symbolizer elements - PointSymbolizer, LineSymbolizer, PolygonSymbolizer, RasterSymbolizer, and TextSymbolizer - allowing different features to render differently based on their data values.
SLD 1.0.0 was published in 2002; SLD 1.1.0 (2007) extracted the symbolizer core into a separate OGC Symbology Encoding (SE) 1.1.0 specification. GeoServer and MapServer accept .sld files natively as layer styles, and WMS servers can receive an SLD document as a URL parameter to override default styling at request time. QGIS uses its own .qml format but can import and export SLD for interoperability with other platforms.
.sld files are human-readable plain XML and can be authored in any text editor.
Security & safety
RISK: LOWPlain XML text file with no executable content. No security risk from opening in a text editor or loading into GeoServer/QGIS.
Format details
in a nutshell- AutoCAD Slide File - Legacy binary raster snapshot created by AutoCAD's MSLIDE command; entirely unrelated to GIS SLD; rarely encountered after AutoCAD 2000s.
Programs that open SLD files
Technical details
deep spec| XML root element | `<StyledLayerDescriptor>` with OGC SLD namespace (`http://www.opengis.net/sld`) |
| OGC standard versions | SLD 1.0.0 (OGC 02-070, 2002) and SLD 1.1.0 (OGC 05-078r4, 2007) |
| Symbolizer elements | `PointSymbolizer`, `LineSymbolizer`, `PolygonSymbolizer`, `RasterSymbolizer`, `TextSymbolizer` |
| Conditional rendering | `<Filter>` elements use OGC Filter Encoding for attribute-based rule selection |
| Layer referencing | `<NamedLayer>` references server-side layers; `<UserLayer>` defines inline feature data styling |
| MIME type | `application/vnd.ogc.sld+xml` |
| WMS dynamic styling | SLD can be passed as `SLD` or `SLD_BODY` parameter in WMS `GetMap` requests |
| Symbology Encoding split | SLD 1.1.0 delegates symbolizer definitions to the separate OGC SE 1.1.0 specification |
| GeoServer integration | `.sld` is GeoServer's native style format; manageable via GeoServer REST API |
| QGIS interoperability | QGIS imports and exports SLD despite using `.qml` as its native style format |
| Encoding | UTF-8 text (or per XML declaration); no compression or binary content |
| Typical size | 1 KB - 50 KB for a single map layer's styling rules |
| Released | 2002 (OGC SLD 1.0.0) |
| Latest version | SLD 1.1.0 (OGC 05-078r4, 2007) |
| Open standard | Yes · royalty-free |
| Specification | www.ogc.org |
SLD conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about SLD files.