What is Source Map Decoder
The Source Map Decoder is a client-side tool that parses JavaScript source map files and displays their internal structure in a readable format. Source maps are JSON files generated by minifiers, transpilers, and bundlers (Webpack, Vite, Rollup, esbuild, Terser) that map minified code positions back to original source file locations. They allow browsers' DevTools to show original source code even when the served JavaScript is minified. When you paste a source map JSON object into this tool, it extracts and displays five key properties: the source map version (typically 3), the target file name, the list of original source files referenced, the count of original identifier names preserved, and the size of the encoded mappings string. The tool validates the input by checking for the required version, sources, and mappings fields, and reports an error if the input is not a valid source map. Note that full decoding of the VLQ-encoded mappings string (which translates minified positions to original positions) requires a specialized library; this tool shows the metadata layer, which is sufficient for understanding which files were bundled and how many identifiers were preserved.
How to Use Source Map Decoder
- Step 1: Locate your source map content. It is typically in a .map file adjacent to the minified .js file, or embedded as a base64-encoded data URL in a sourceMappingURL comment at the end of the minified file.
- Step 2: Copy the entire JSON content of the source map and paste it into the input textarea of the Source Map Decoder.
- Step 3: Click Transform. The tool validates the JSON and displays the source map structure: version number, file name, list of source files, identifier count, and mappings size.
- Step 4: The info bar confirms whether the input was recognized as a valid source map. If it shows an error, the input may be truncated, malformed, or not a source map.
Why Use Source Map Decoder
Source maps are critical for debugging production applications, but their internal structure is opaque — a typical source map is a dense JSON blob with thousands of characters of VLQ-encoded mappings. When debugging issues in bundled code, you often need to quickly answer: which source files were included in this bundle? How many identifiers were preserved? What is the version? This tool answers those questions instantly without requiring you to open the JSON in an editor and manually search for fields. It is also useful for verifying that your build pipeline is generating source maps correctly — if the sources list is empty or the version is wrong, you know there is a configuration issue before you even try to use the map in DevTools.
Privacy & Security
This tool runs entirely in your browser — no data ever leaves your device. There is no server round-trip, no upload, no logging, and no account required. Your input is processed locally using client-side JavaScript and is never stored, transmitted, or accessible to anyone else. When you close the tab, everything disappears.
Frequently Asked Questions
Can this tool decode the actual mappings?
<p>No. The VLQ-encoded mappings string requires a specialized decoder (like the source-map library) to translate specific minified positions to original file locations. This tool shows the metadata layer — file names, source list, and identifiers — which is usually sufficient for quick inspection.</p>Where do I find source maps?
<p>Source maps are typically in .map files alongside your minified JavaScript, or embedded as base64 data URLs in a //# sourceMappingURL comment at the end of the JS file. Your build tool's documentation will specify how to enable source map generation.</p>What source map versions are supported?
<p>The tool supports version 3, which is the standard for all modern JavaScript tools. Version 2 (legacy) may also work but is rarely encountered in practice.</p>