XSD Viewer and Visual XSD Map for Mac
View and map XML Schema (XSD) locally on Mac
XML Lens includes a native XSD Viewer and Visual XSD Map for inspecting XML Schema on your Mac. Browse declarations beside source, map type and reference relationships, load a local schema folder to resolve imports and includes, then search, format, compile, and save without uploading the schema.
Listed as XML Editor Lens: XPath on the Mac App Store.

Browse the schema instead of scanning raw markup
Open, paste, or drag an .xsd file into a dedicated workspace. XML Lens builds a namespace-aware navigator for schema elements, simple and complex types, attributes, groups, and occurrence rules while keeping the source visible beside it.
Use the Globals view to focus on top-level declarations, or select a construct in the tree to reveal its source context.
- Expandable structure tree for XSD constructs
- Global declaration browsing for named schema components
- Source context for elements, types, attributes, and groups
- Dedicated workspace that does not replace the open XML document
Search declarations and compile with visible diagnostics
Search construct names, types, references, and base types across the schema. Compile the open schema to catch structural issues, then review diagnostics with source context before saving or using it for XML validation.
For a schema set, load its local folder so Visual XSD Map can resolve local xs:include and xs:import dependencies. XML Lens does not claim XSD 1.1 support or fetch remote schema resources.
If a schema refuses to compile because a file it includes is missing, how to open an XSD file and keep its includes and imports together shows the xmllint error and how to fix it.
- Search names, types, refs, and bases
- Compile a schema locally
- Review diagnostics without an online XSD tool
- Resolve local imports and includes from a selected schema folder
Map schema relationships across local files
Visual XSD Map draws relationships for types, references, inheritance, groups, and schema-file dependencies. Toggle relationship types to reduce noise, inspect a declaration, and navigate to related schema source.
Dependency resolution stays within the local schema folder you select. The map does not turn XML Schema into a different model or guarantee that an incomplete folder contains every dependency.
- Type, reference, inheritance, group, and schema-file links
- Relationship filters and reference navigation
- Local folder loading for imports and includes
- No schema uploads
Format, minify, edit, and save locally
Pretty-print a compressed schema for review, minify it for compact storage, edit the syntax-highlighted source, and save the result as an .xsd file. These actions apply only to the XSD workspace, so switching to the schema does not overwrite the current XML Editor document.
XSD Viewer and Visual XSD Map are part of XML Lens 1.9.13 for macOS 15 or later. Schema content, filenames, paths, searches, and diagnostics stay on the Mac, and XML Lens does not collect product analytics.
- Format or minify XSD source
- Open, paste, drag, edit, and save .xsd files
- Schema state stays isolated from XML Editor state
- Local processing with no file uploads
Online XSD viewer or a local one?
Online XSD viewers are convenient for public standards: paste the schema, get a tree. Two things make them a poor fit for everyday schema work. Internal and partner schemas describe your systems and data, and pasting them into a website sends that description to someone else. And most real schemas are split across files: xs:include and xs:import point to sibling files by relative path, which a single paste box cannot see, so the tree comes back with unresolved types.
A local XSD viewer avoids both. XML Lens reads the schema on your Mac, and when you load the schema folder, Visual XSD Map resolves the local includes and imports in it. Nothing is uploaded, and it works offline.
- No upload of internal or partner schemas
- Multi-file schemas resolved from a local folder
- Works without a network connection
Free ways to look inside an XSD
An XSD is plain-text XML, so TextEdit opens it, and the built-in xmllint command can indent it or confirm it is well-formed. Visual Studio Code also highlights .xsd files as XML. These are enough for a short schema; a viewer helps once the schema spans many types or files. The guide on how to open an XSD file walks through each option with examples.
If you want one editor that also validates XML against the schema, compare which Mac XML editors support XSD validation, including free options.
XSD Viewer and XML validation solve different jobs
Use XSD Viewer when you need to understand, search, edit, format, or compile the schema itself. Use Validate when you need to check whether an XML document conforms to a selected XSD. The two workflows remain separate so schema exploration never replaces the XML document under review.
Frequently asked questions
Can I view and format an XSD file on a Mac?
Yes. Open, paste, or drag an .xsd file into XML Lens XSD Viewer to browse its structure beside syntax-highlighted source, then format, minify, edit, compile, or save it locally.
What is the difference between XSD Viewer and Validate?
XSD Viewer helps you inspect and work on the schema itself. Validate checks whether an XML document conforms to a selected XSD. The XSD workspace is isolated, so opening a schema does not replace the XML document in the Editor.
Does XML Lens upload my XSD schema?
No. XSD source, filenames, paths, searches, and compile diagnostics stay on your Mac. XML Lens does not upload schemas and does not collect product analytics.
Does XSD Viewer resolve xs:include or xs:import?
Yes, for local dependencies. Load a local schema folder so XML Lens can resolve xs:include and xs:import files available in that folder. It does not fetch remote schema resources and does not claim XSD 1.1 support.
Is there an online XSD viewer?
Yes, several websites display a pasted schema as a tree. They suit public schemas. For internal schemas, or schemas split across files with xs:include and xs:import, a local viewer such as XML Lens keeps the files on your Mac and resolves the local dependencies.
Is there a free XSD viewer?
TextEdit and xmllint are free and already on your Mac, and Visual Studio Code highlights XSD as XML. XML Lens is a free download with a 10-day full trial and an optional one-time Pro purchase.
Does XML Lens XSD Viewer run on Windows or Linux?
No. XML Lens is a native Mac app for macOS 14.0 or later. On Windows or Linux, Visual Studio Code is a cross-platform editor that opens and highlights .xsd files.
Can XSD Viewer generate sample XML or a schema map?
XML Lens includes a Visual XSD Map for exploring type, reference, inheritance, group, and schema-file relationships. It does not generate sample XML.