Updated Jul 15, 2026

Discovery

Rebuild original JavaScript from exposed sourcemaps

Reconstruct JavaScript source trees from Sourcemap files.

Agent

overview

What sourcemapper does

sourcemapper downloads a JavaScript sourcemap and reconstructs the original source tree the bundler embedded inside it. Production builds often leave .js.map files next to minified bundles; when they do, the map exposes readable modules, paths, and comments.

Pass -url for a map URL, or -jsurl for a script URL when the map is referenced from the bundle. -url and -jsurl cannot be combined. Optional -proxy and -header mirror a curl-style fetch; -insecure skips TLS verification for lab hosts with broken certificates.

Run it after a crawler surfaces .map references. Recovered sources write to a FOLDER for review of endpoints, secrets, and internal paths that minified bundles hide.

source github.com/denandz/sourcemapper

use cases

Where sourcemapper fits

Recover sources from a public .map

Fetch a discovered sourcemap URL and write the original file tree for offline review of modules the minified bundle hid.

Follow a script URL to its map

Pass -jsurl when you have the bundled JavaScript and need sourcemapper to locate and pull the linked map automatically.

Review recovered paths for endpoints

Search the rebuilt tree for API routes, admin screens, and feature flags that never appear in the minified output.

Fetch maps through a proxy

Set -proxy and -header when the map is only reachable through an authenticated or corporate egress path.

reference

sourcemapper inputs and flags

6 inputs
NameTypeFlagDescription
urlSTRING-urlURL to the Sourcemap file (cannot be used with jsurl).
jsurlSTRING-jsurlURL to JavaScript file (cannot be used with url).
sourcemapFILE-urlPath to a local Sourcemap file (cannot be used with jsurl).
proxySTRING-proxyProxy URL for the fetch.
headerSTRING-headerExtra request header, similar to curl -H (repeatable).
insecureBOOLEAN-insecureIgnore invalid TLS certificates.

Showing key inputs. sourcemapper exposes 6 inputs in total.

example

Run sourcemapper

sourcemapper · command
# rebuild sources from a public sourcemap on example.comsourcemapper -url https://example.com/static/app.js.map
sample output
[+] Retrieving sourcemap from https://example.com/static/app.js.map[+] Sourcemap retrieved, unpacking sources...[+] Writing src/components/App.js[+] Writing src/api/client.js[+] Writing src/pages/Login.js[+] Writing src/utils/config.js[+] Writing webpack:///external/vendor.js[+] Done: 48 files under ./example.com/

guidance

Choosing sourcemapper

Reach for sourcemapper when a crawler finds .map files or JavaScript bundles with sourcemaps still attached. It reconstructs source; it does not crawl. Run it after katana or a JS finder. To pull endpoints from minified JS without a map, use a JS-link extractor instead.

katana

Crawls a site and surfaces .js and .js.map references. Run it before sourcemapper to find the maps.

subdomainizer

Scrapes JavaScript for subdomains and secrets without rebuilding source. Complements full source recovery.

faq

sourcemapper questions

Either -url pointing at a .map file, -jsurl pointing at a JavaScript bundle that references a map, or a local sourcemap file. -url and -jsurl cannot be combined.

Run sourcemapper yourself

A target feeds katana, which surfaces sourcemap references that sourcemapper rebuilds into an original source tree written as output.

Facts on this page come from the live Trickest tool library.