MAP File Documentation
Summary
The .map extension is a generic, application-defined label rather than one fixed file format. Different programs write unrelated .map files: a JavaScript or CSS source map (JSON debugging data), MapInfo GIS geometry, a game-level layout, or a linker/debug map. They share no common structure or magic number. The only reliable way to know what a given .map is: check which program produced it, then inspect the first bytes.
Technical details
| Feature | Value |
|---|---|
| Extension | .map |
| Format type | Ambiguous — application-defined; no single format |
| Nature | Generic label reused by many unrelated programs |
| Fixed magic number | None — varies entirely by producing program |
| Common meaning (web) | JavaScript / CSS source map (JSON text, "version":3) |
| Source-map MIME | application/json |
| Common meaning (GIS) | MapInfo table geometry (binary, paired with a .tab) |
| Common meaning (games) | Level layout (text, e.g. Quake/Source/Radiant editors) |
| Common meaning (compilers) | Linker / debug map (text listing of symbol addresses) |
| Text or binary | Either, depending on producer |
| How to identify | Note the source program; inspect the header bytes |
| Related extensions | .js, .css, .json, .tab, .bsp |
What is a MAP file?
A .map file is not a single format. The three letters are a generic extension that many unrelated programs have adopted independently, each with its own internal structure. A .map written by a web build tool has nothing in common with a .map from a GIS package, a game editor, or a compiler. There is no shared header, no shared magic number, and no universal viewer. Deciding what one particular .map is means answering one question first: which program created it?
The extension is old and vague enough that it collides across whole industries. Below are the meanings you are actually likely to encounter, what each really contains, and how to tell them apart from the bytes rather than the name.
The JavaScript/CSS source map (the common modern meaning)
In web development, a .map is almost always a source map: a JSON text file that records how a minified or compiled file corresponds, position by position, to the original source. When a build tool such as webpack, Vite, the TypeScript compiler or Sass strips whitespace and shortens names for production, the output is unreadable. The source map lets a browser’s developer tools show your original source and set breakpoints in it while the browser actually runs the minified file. Such files are conventionally named after what they map, for example app.js.map beside app.min.js, or styles.css.map beside the compiled CSS.
A source map is Source Map Revision 3, and its JSON has a small, fixed set of keys:
{
"version": 3,
"file": "app.min.js", // the generated file this maps
"sources": ["src/index.ts"], // original source paths
"names": ["render","props"], // original identifier names
"mappings": "AAAA,CAAC,SAAQ...", // VLQ-encoded position table
"sourcesContent": ["..."] // optional inlined original source
}
The "mappings" string is Base64 VLQ-encoded (variable-length quantity) and is not meant to be read by hand; each segment encodes the generated column plus deltas into the source file, line, column and name index. You never open a source map manually to use it — DevTools fetch it automatically. If you just want to confirm a mystery .map is a source map, open it in a text editor and look for "version":3 and a "sources" array. A practical caution: source maps shipped to a live server can expose your original, un-minified code (and, with sourcesContent, the full source) to anyone who opens DevTools, which is why many teams strip them from production builds. See JSON, since a source map is ordinary JSON, and the JS and CSS files it describes.
MapInfo GIS geometry (the geographical meaning)
In geographic information systems, a .map is a binary geometry store belonging to a MapInfo table. Here the .map never stands alone: it is one file in a set that also includes a .tab (the table header that names the other files), a .dat or .id (attribute data and index), and often a .ind. The .map holds the coordinate geometry of the map objects (points, lines, regions), while the .tab is the file you actually open. Loading a lone MapInfo .map without its companion .tab generally fails, because the .tab is what declares the projection and links the geometry to its attributes. This GIS sense is the one the “geographical map file” label historically referred to, and it is opened in QGIS or MapInfo Pro through the .tab, not the .map.
Game-level and linker maps (text meanings)
Two more meanings are plain text. Level editors in the Quake, Source and id Tech lineage save a game level as a .map: a human-readable description of brushes (convex solids), entities and their properties, which a compiler later turns into a binary playable level such as a .bsp. The .map is the editable source; the .bsp is the built artefact, much as a source file relates to a compiled binary.
A compiler or linker also emits a debug/link map named .map: a text report listing every symbol (functions and variables), the memory address or section each was placed at, and the module it came from. Developers read it to understand memory layout or to translate a raw crash address back into a function name. Like the game map, it is a by-product meant for tooling and humans, not an application data file.
How to tell which kind of MAP you have
Because the extension is meaningless on its own, identify a .map from two signals: its origin and its first bytes. Origin is usually decisive — a file that came out of a website’s dist folder is a source map, one that arrived with a .tab is MapInfo GIS, one from a game modding kit is a level. When origin is unknown, open the file and look at the start:
| First bytes / content | Likely meaning |
|---|---|
Text starting with { and containing "version":3 | JavaScript/CSS source map (JSON) |
Readable text with { brush blocks and "classname" | Game-level map (Quake/Source editor) |
| Readable text listing addresses and symbol names | Linker / debug map |
Binary, and a matching .tab file sits next to it | MapInfo GIS geometry |
If the file is text and self-explanatory, any editor reads it. If it is binary and paired with other files, you need the application that created the set. The safest general rule for a generic extension like this: never assume the .map tells you the format — the producing program does.
References
- Source Map Revision 3 specification
- Chrome DevTools — Map preprocessed code to source
- MDN / Firefox DevTools — Use a source map
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.