What is the MAP file format?
A .map file is a plain-text JSON document that links minified or compiled output - a bundled .js file or a compiled CSS stylesheet - back to the original human-readable source code. Build tools such as webpack, Vite, esbuild, and the TypeScript compiler (tsc) generate .map files automatically alongside their output.
The format was standardized as Source Map Revision 3 around 2011 and is now universally supported across every major JavaScript and CSS build pipeline. A source map sits next to the file it describes - app.js produces app.js.map, styles.css produces styles.css.map - and the minified file references it via a trailing comment: //# sourceMappingURL=app.js.map (or /*# sourceMappingURL=styles.css.map */ for CSS).
The heart of every source map is the mappings field: a compact Base64 VLQ-encoded string that records a segment-by-segment translation from each character position in the output back to the corresponding line and column in the original source. Other fields carry the original file paths (sources), optionally the full source text (sourcesContent), and symbol names (names).
Browser developer tools - Chrome DevTools, Firefox Developer Tools, and Safari Web Inspector - consume .map files transparently. Developers can set breakpoints in TypeScript or SCSS and step through original code even though the browser executes minified output. The .map file is only fetched when DevTools is open; it adds no overhead to normal browsing.
Security & safety
RISK: LOWA source map is passive JSON and doesn't execute code, so opening one is harmless. The real concern is a privacy/security one for developers: source maps shipped to production can expose your original, un-minified source code - and sometimes comments, file paths, or sourcesContent - to anyone who opens DevTools. Many teams deliberately strip or block .map files on public servers for this reason. If you find unexpected .map files on a live site, that may be an information-disclosure issue worth fixing.
Format details
in a nutshell- MapInfo GIS data (.map + .tab) - Binary geometry store for a MapInfo table; opened via its companion .tab in QGIS or MapInfo Pro, not on its own.
- Game level map - Plain-text level geometry from id Tech / Quake / Source / Radiant editors, compiled to a binary level (e.g. .bsp) for play.
- Linker / debug map - Plain-text listing of symbol addresses and memory layout emitted by a compiler/linker for debugging crashes.
Programs that open MAP files
Technical details
deep spec| Format type | Plain-text JSON (UTF-8); no binary magic bytes |
| Specification | Source Map Revision 3 (v3) |
| MIME type | application/json |
| Mappings encoding | Base64 VLQ (Variable-Length Quantity) - encodes line and column offsets for every output segment |
| Required JSON fields | version (must equal 3), sources (array of original file paths), mappings (VLQ-encoded string) |
| Optional JSON fields | sourcesContent (embedded original text), names (symbol list), sourceRoot (path prefix for all sources) |
| Naming convention | Output filename with .map appended: app.js → app.js.map, styles.css → styles.css.map |
| Source link comment (JS) | //# sourceMappingURL=filename.js.map - appended to the last line of the minified file |
| Source link comment (CSS) | /*# sourceMappingURL=filename.css.map */ - appended to the compiled stylesheet |
| Typical generators | webpack, Vite, esbuild, TypeScript compiler (tsc), Dart Sass, Rollup, Parcel |
| Consumed by | Browser DevTools: Chrome DevTools, Firefox Developer Tools, Safari Web Inspector, Edge DevTools |
| Mapping precision | Column-level: each VLQ segment maps a single output column to source line and column |
| File size | Typically 2-10× the size of the minified output; grows further when sourcesContent is embedded |
| HTTP delivery alternative | X-SourceMap response header (deprecated; inline comment is the preferred method) |
| DevTools activation | Fetched only when browser DevTools is open; not requested during normal page load |
| Released | Source Map format v3 (~2011); ubiquitous with modern JS/CSS build tooling |
| Open standard | Yes · royalty-free |
| Specification | sourcemaps.info |
MAP conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about MAP files.