Sourcemap Lookup
Resolve a generated line:column to original source via a v3 source map.
Overview
Paste a v3 source map (or upload the .map file) and a generated line:column position, and the tool returns the original source file, line, and column. Useful when a production error log gives you a stack frame in a minified bundle and you need the original location to debug.
It's for frontend developers chasing exceptions in minified JavaScript, and toolchain authors debugging their own source-map output. Reach for it when an error-monitoring service is missing a source map and you have the file locally, or when you want to spot-check a mapping without spinning up a build server.
How it works
Source Map v3 (the de facto standard, documented by Mozilla / the Source Map RFC draft) is a JSON file with version, sources, names, and a mappings string. The mappings use Base64 VLQ encoding: each segment is a relative offset from the previous segment, decoded to produce a tuple of (generated column, source index, original line, original column, name index).
The lookup walks the mappings in order, tracks the cumulative state, and returns the segment whose generated position matches your input. Out-of-range lookups (column past the last mapping in a line) return the nearest preceding mapping.
Examples
- Look up a minified position:
Input: line 1, column 234 Source: bundle.js -> resolves to src/components/Header.jsx, line 42, column 15 - Original symbol name (if
namestable is populated):Returned name: handleSubmit - Inline source maps (
//# sourceMappingURL=data:application/json;base64,...) supported. - Map file with
sourcesContentlets you see a snippet of the original code.
FAQ
Where do I find the source map?
Look for a //# sourceMappingURL=... comment at the end of your minified file, or the matching bundle.js.map next to the bundle. Production builds often strip these for size.
What if the map references files I don't have?
If sourcesContent is populated in the map, the original code is embedded. Otherwise the source paths are just labels - resolve them yourself against your repo.
Does it support older source-map versions?
V3 has been the standard since 2011. V1 and V2 (1-2 file versions) are essentially extinct - if you encounter them, regenerate with a modern tool.
Why is the result off by one column?
Both lines and columns in v3 are zero-based. Some debuggers display them 1-based. Match the conventions of whichever tool gave you the position.