Visualise your ServiceNow table schema — inheritance chains, reference fields, M2M relationships, CMDB CI topology — in a single self-contained HTML file. No installation, no server, no external dependencies.
Community tool — not developed, endorsed, or affiliated with ServiceNow, Inc.
- Force-directed Schema Map with adjustable hop depth, max nodes, and edge-type filters
- Advanced filter builder — narrow the canvas by scope, table type, table access, name, field, edge type, field count, or custom prefix
- Inspect any table's fields, types, inheritance chain, references, M2M links, and CMDB CI topology
- Search by table name or field name across the full dataset
- Path Finder — shortest dot-walk path between any two tables or to a specific field; hop exclusions to suppress hub tables
- Schema Diff — compare two registered instances to see added, removed, and changed tables/fields
- Configuration Data — view and reconcile plugins, store apps, custom apps, and system properties across your registered instances; available from a single instance (one column) and lights up version drift, missing entries, active-state mismatches, and the store-app update signal as you add more; an Instance Data tab compares instance identity/runtime/export metadata and schema stats side by side, and the header instance dropdown (base) + Compare multi-select choose which instances to compare — the same controls as the Schema Map; export the active section as CSV or JSON from the header Export bar
- Saved Views — snapshot and restore named view configurations
- Export as PNG, SVG, JSON, Markdown, JSON-LD, OWL/Turtle, or OpenAPI YAML — and, while a comparison is active, fold the diff into any data export (Include comparison) or export the diff on its own (the Comparison scope), choosing which compares to include
- Custom colour-coded export background with opacity control, plus an optional Legend embedded in PNG/SVG exports — edge types, and a Differences (Added/Removed/Changed) key while a comparison is active. PNG/SVG also carry the on-canvas diff colouring.
- CMDB CI topology edges and ServiceNow Data Model Reference (CSDM 5)
- Optional update check — a dismissible footer badge when a newer release is available (toggle in Settings; no telemetry)
One file does everything. Download sn_schema_explorer.html from Releases.
It includes the Schema Map, Inspector, Path Finder, Schema Diff, Export, Settings, Guide, and Setup Instructions (with the exporter scripts embedded for easy copy-paste, plus a small form to configure the background script's CONFIG block before you copy it).
Requires the admin role. No instance-side configuration needed.
- Navigate to System Definition → Scripts - Background
- Switch the application scope picker to Global
- Paste the Background Script (copy from the Setup Instructions tab inside
sn_schema_explorer.html) - Make sure Execute in sandbox? is unchecked — sandbox mode blocks the attachment write
- Click Run script — takes 45–90 s on a typical instance
- The output is saved as a JSON attachment on your user record; download it from Self-Service → My Profile → Attachments
The Background Script supports
json,markdown, andjsonldoutput only. OWL/Turtle and OpenAPI are unavailable here (their serialisers are too complex for the ES5/Rhino engine) — export JSON and convert in the viewer (Export → OWL/Turtle or OpenAPI), or use the Node.js extractor with--format=owl|openapi.
To include the optional cross-instance metadata sections,
edit the CONFIG block at the top of the script: set
metadataSections: ['plugins', 'storeApps', 'customApps', 'properties'] (any
subset). sys_properties values are off by default — set
includePropertyValues: true to include them (still denylist-redacted via
propertyValueDenylist), and optionally narrow rows with propertyEncodedQuery.
Metadata is emitted for the json format only. The shape is identical to the
Node extractor's, so both feed the same cross-instance comparison in the viewer.
Requires Node.js 22+ and network access to your instance.
Secrets are passed via environment variables, not flags. The extractor refuses
--password/--apikeyon the command line because they leak into shell history and process listings. UseSN_PASSWORD/SN_APIKEYinstead.
# Basic Auth
SN_PASSWORD='***' node sn-schema-export.node.standalone.js \
--instance=https://your-instance.service-now.com \
--user=admin \
--output=schema.json
# API key auth (alternative to user/password)
SN_APIKEY='<sn_api_key>' node sn-schema-export.node.standalone.js \
--instance=https://your-instance.service-now.com \
--output=schema.jsonKey flags:
| Flag | Default | Description |
|---|---|---|
--instance |
— | Instance URL (required) |
--user |
— | Basic Auth username (password via SN_PASSWORD) |
--output |
(format-dependent) | Output file path |
--format |
json |
Output format: json · markdown · jsonld · owl · openapi |
--edge-types |
all six | Comma-separated subset of reference,extends,m2m,rel,view,cmdb_rel |
--include-record-counts |
off | Add per-table record counts (adds 5–15 min) |
--metadata |
(none) | Opt-in sections: plugins,storeApps,customApps,properties (JSON only) |
--include-property-values |
off | Include sys_properties values (denylist-redacted); off by default |
--property-query |
(none) | Encoded query narrowing which sys_properties rows export |
--page-size |
1000 |
Rows per API request |
Credentials are supplied through environment variables only: SN_PASSWORD
(Basic auth) or SN_APIKEY (API key auth).
When --output is omitted the filename is derived from the format: sn_schema_export.json, .md, .jsonld, .ttl, or .yaml.
Other environment variable equivalents: SN_INSTANCE, SN_USER, SN_OUTPUT, SN_FORMAT, SN_EDGE_TYPES, SN_PAGE_SIZE, SN_METADATA, SN_PROPERTY_QUERY.
--metadata adds opt-in sections to the JSON export under a top-level
_metadata key, with capability flags under _capabilities.metadata.<section>.
These describe the instance beyond its table schema — installed plugins,
store apps, custom apps, and system properties — and power
cross-instance comparison in the viewer. Each entry carries its version and
active state; store apps also include latestVersion / updateAvailable (the
"update available" signal) and install/update dates, plugins an install date,
and custom apps install/update dates. Sections are emitted only when requested,
and each fetch degrades gracefully on instances missing the source table.
sys_properties values can hold secrets, so values are off by default
(names + metadata only). --include-property-values opts in, and even then a
central denylist (password|secret|key|token|cred|private|passwd) redacts
matching property values; _capabilities.metadata.properties reports
valuesIncluded and redactedCount. Metadata is JSON-only — the markdown,
JSON-LD, OWL, and OpenAPI formats ignore it.
Copy the extractor script from the Setup Instructions tab inside sn_schema_explorer.html, or find it in dist/exporter/ after a build.
- Open
sn_schema_explorer.htmlin any modern browser — it opens on the landing page - Drag and drop one or more
schema.jsonexports onto the Add instance card (or click to browse). Each load registers an instance card showing the sections it contains (Schema / Plugins / Store apps / Custom apps / Properties); click or load demo to try a sample - Click the Schema Explorer icon on an instance card to visualise it — click any table to inspect it
- Use the Max Nodes and Hop Depth sliders to control graph density
- Use Filter in the header to narrow the canvas by scope, type, field, or edge
- Enable Path Finder or Schema Diff via Settings → Features
- Switch between tools (Schema Map, Path Finder, Schema Diff, Configuration Data) from the tool switcher in the header, and switch the loaded instance from the instance dropdown beside it
- Use the Home button in the header to return to the landing page — register more instances or switch tools
Register multiple instance exports to compare across them; tool tiles light up when enough instances carry the data they need. Large schemas are split into a manifest + .part*.json files — drop all files at once and the loader reassembles them automatically.
Prerequisites: Node.js 22+, npm
git clone https://github.com/revampd/sn-schema-explorer.git
cd sn-schema-explorer
npm install
npm run build # builds all targetsOutput lands in dist/. Individual targets:
npm run build:app # dist/sn_schema_explorer.html
npm run build:export # dist/exporter/* (bg script + node extractor)npm run lint # ESLint
npm run test:unit # vitest unit tests
npm run test:coverage # unit tests with coverage
npm run test:e2e # Playwright e2e (build first; needs `npx playwright install chromium`)
npm test # unit + e2eSee CONTRIBUTING.md for the full workflow, and CHANGELOG.md for release history.
This project is an independent, community-built tool and is NOT developed, endorsed, supported, or affiliated with ServiceNow, Inc. in any way. "ServiceNow" is a registered trademark of ServiceNow, Inc. Use at your own risk.


