Source Map Stack Trace Decoder Online
Turn minified JavaScript stack traces into original files, lines, function names and code context with uploaded or auto-discovered source maps.
Result
Press “Run” to see the result.
Paste a stack trace from Chrome / Edge / Node (at fn (file:line:col)), Firefox / Safari (fn@file:line:col) or React Native / Hermes, plus the source map: map (JSON or a JS file with an inline data: sourceMappingURL), maps (an object {"app.js.map": …} for several bundles), map_url, or a .map / .zip of maps as a file. With fetch=1 the service downloads each script URL in the trace, follows its //# sourceMappingURL comment or SourceMap header and fetches the map (public URLs only, size and redirect limits).
Each frame gets the original source, line, column, the original function name (taken from the caller's mapping, like error trackers do), context lines from sourcesContent, and a library flag for node_modules / ignore-listed sources; resolved_stack is the whole trace rewritten. Index maps (sections) and maps from Vite, webpack, esbuild, Rollup and Terser work. action=lookup maps one line / column (or the reverse with source=); action=validate checks a map: version, sources / sourcesContent consistency, mappings that decode and stay inside the source, ignoreList, debugId, and warns when the map exposes your source code.
Maps and code are processed in memory and never stored or logged. Uses source-map-js (BSD-3-Clause).
Use this in your code
curl -X POST "https://apibox.io.vn/v1/source-map" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"stack":"Error: boom at 3\n at n (https://example.com/assets/out.js:1:47)\n at t (https://example.com/assets/out.js:1:122)\n at u (https://example.com/assets/out.js:1:156)","map":{"version":3,"sources":["lib.ts","app.ts"],"sourcesContent":["export function helper(x: number): number {\n if (x > 2) {\n throw new Error('\''boom at '\'' + x);\n }\n return x * 2;\n}\n","import { helper } from '\''./lib'\'';\n\nfunction computeTotal(items: number[]): number {\n let sum = 0;\n for (const i of items) sum += helper(i);\n return sum;\n}\n\nexport function main() {\n return computeTotal([1, 2, 3]);\n}\nmain();\n"],"mappings":"mBAAO,SAASA,EAAOC,EAAmB,CACxC,GAAIA,EAAI,EACN,MAAM,IAAI,MAAM,WAAaA,CAAC,EAEhC,OAAOA,EAAI,CACb,CCHA,SAASC,EAAaC,EAAyB,CAC7C,IAAIC,EAAM,EACV,QAAWC,KAAKF,EAAOC,GAAOE,EAAOD,CAAC,EACtC,OAAOD,CACT,CAEO,SAASG,GAAO,CACrB,OAAOL,EAAa,CAAC,EAAG,EAAG,CAAC,CAAC,CAC/B,CACAK,EAAK","names":["helper","x","computeTotal","items","sum","i","helper","main"]},"context":1}'const res = await fetch('https://apibox.io.vn/v1/source-map', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"stack": "Error: boom at 3\n at n (https://example.com/assets/out.js:1:47)\n at t (https://example.com/assets/out.js:1:122)\n at u (https://example.com/assets/out.js:1:156)",
"map": {
"version": 3,
"sources": [
"lib.ts",
"app.ts"
],
"sourcesContent": [
"export function helper(x: number): number {\n if (x > 2) {\n throw new Error('boom at ' + x);\n }\n return x * 2;\n}\n",
"import { helper } from './lib';\n\nfunction computeTotal(items: number[]): number {\n let sum = 0;\n for (const i of items) sum += helper(i);\n return sum;\n}\n\nexport function main() {\n return computeTotal([1, 2, 3]);\n}\nmain();\n"
],
"mappings": "mBAAO,SAASA,EAAOC,EAAmB,CACxC,GAAIA,EAAI,EACN,MAAM,IAAI,MAAM,WAAaA,CAAC,EAEhC,OAAOA,EAAI,CACb,CCHA,SAASC,EAAaC,EAAyB,CAC7C,IAAIC,EAAM,EACV,QAAWC,KAAKF,EAAOC,GAAOE,EAAOD,CAAC,EACtC,OAAOD,CACT,CAEO,SAASG,GAAO,CACrB,OAAOL,EAAa,CAAC,EAAG,EAAG,CAAC,CAAC,CAC/B,CACAK,EAAK",
"names": [
"helper",
"x",
"computeTotal",
"items",
"sum",
"i",
"helper",
"main"
]
},
"context": 1
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/source-map",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"stack": "Error: boom at 3\n at n (https://example.com/assets/out.js:1:47)\n at t (https://example.com/assets/out.js:1:122)\n at u (https://example.com/assets/out.js:1:156)", "map": {"version": 3, "sources": ["lib.ts", "app.ts"], "sourcesContent": ["export function helper(x: number): number {\n if (x > 2) {\n throw new Error('boom at ' + x);\n }\n return x * 2;\n}\n", "import { helper } from './lib';\n\nfunction computeTotal(items: number[]): number {\n let sum = 0;\n for (const i of items) sum += helper(i);\n return sum;\n}\n\nexport function main() {\n return computeTotal([1, 2, 3]);\n}\nmain();\n"], "mappings": "mBAAO,SAASA,EAAOC,EAAmB,CACxC,GAAIA,EAAI,EACN,MAAM,IAAI,MAAM,WAAaA,CAAC,EAEhC,OAAOA,EAAI,CACb,CCHA,SAASC,EAAaC,EAAyB,CAC7C,IAAIC,EAAM,EACV,QAAWC,KAAKF,EAAOC,GAAOE,EAAOD,CAAC,EACtC,OAAOD,CACT,CAEO,SAASG,GAAO,CACrB,OAAOL,EAAa,CAAC,EAAG,EAAG,CAAC,CAAC,CAC/B,CACAK,EAAK", "names": ["helper", "x", "computeTotal", "items", "sum", "i", "helper", "main"]}, "context": 1},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/source-map');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"stack":"Error: boom at 3\\n at n (https://example.com/assets/out.js:1:47)\\n at t (https://example.com/assets/out.js:1:122)\\n at u (https://example.com/assets/out.js:1:156)","map":{"version":3,"sources":["lib.ts","app.ts"],"sourcesContent":["export function helper(x: number): number {\\n if (x > 2) {\\n throw new Error(\'boom at \' + x);\\n }\\n return x * 2;\\n}\\n","import { helper } from \'./lib\';\\n\\nfunction computeTotal(items: number[]): number {\\n let sum = 0;\\n for (const i of items) sum += helper(i);\\n return sum;\\n}\\n\\nexport function main() {\\n return computeTotal([1, 2, 3]);\\n}\\nmain();\\n"],"mappings":"mBAAO,SAASA,EAAOC,EAAmB,CACxC,GAAIA,EAAI,EACN,MAAM,IAAI,MAAM,WAAaA,CAAC,EAEhC,OAAOA,EAAI,CACb,CCHA,SAASC,EAAaC,EAAyB,CAC7C,IAAIC,EAAM,EACV,QAAWC,KAAKF,EAAOC,GAAOE,EAAOD,CAAC,EACtC,OAAOD,CACT,CAEO,SAASG,GAAO,CACrB,OAAOL,EAAa,CAAC,EAAG,EAAG,CAAC,CAAC,CAC/B,CACAK,EAAK","names":["helper","x","computeTotal","items","sum","i","helper","main"]},"context":1}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Do you keep my source maps?
No. Maps, scripts and stack traces are processed in memory for that request only and are not stored or logged.
Why is the function name taken from the next frame?
Minified frames carry the minified name; the original name is the identifier mapped at the call site in the calling frame, as Sentry and Chrome DevTools do.
What if my map has no sourcesContent?
Frames still resolve to original file / line / column, but no code context can be shown; action=validate reports it.