Parse and encode FIT files in JavaScript and TypeScript, with ESM and CommonJS builds.
The API reference follows the package exports; the decoded field reference describes
nested values returned through ParsedFit.
npm install fit-file-parser
Node.js examples require Node 20 or newer. Follow Parse FIT files for a runnable Node example, browser file input and CommonJS imports.
| Task | Entry point |
|---|---|
| Decode named fields, enums and timestamps | Default FitParser from fit-file-parser |
| Encode explicitly defined FIT messages | fit-file-parser/encoder |
| Look up manufacturer, product and sport identifiers | fit-file-parser/profile |
| Read strict wire-level messages and exact bytes | fit-file-parser/raw |
The narrow entry points keep unrelated decoder/profile code out of that import. Named helpers are also available from the package root.
fit-file-parser/encoder.fit-file-parser/raw,
with readFitUnsignedField and
fitTimestampToUnixMilliseconds for interpreting selected raw fields.fit-file-parser/profile.The decoded field reference includes nested interfaces and enum types for navigation.
These names are not all named package exports. Use ParsedFit and indexed access types
as shown in Understand decoded fields; do not import internal source paths.
Documentation is built from the repository source. See the GitHub repository and npm package for releases.