A full-featured protobuf implementation in plain JavaScript.

npm install protobufjs
435 downloads in the last day
4 017 downloads in the last week
16 992 downloads in the last month

ProtoBuf.js - protobuf for JavaScript

Protocol Buffers are a language-neutral, platform-neutral, extensible way of serializing structured data for use in communications protocols, data storage, and more, originally designed at Google (see).

ProtoBuf.js is a pure JavaScript implementation on top of ByteBuffer.js including a .proto parser, message class building and simple encoding and decoding. There is no compilation step required, it's super easy to use and it works out of the box on .proto files!

Getting started


  • RequireJS/AMD compatible
  • node.js/CommonJS compatible, also available via npm
  • Browser compatible
  • Closure Compiler compatible (fully annotated, externs)
  • Fully documented using jsdoc3
  • Well tested through test.js
  • ByteBuffer.js is the only production dependency
  • Fully compatible to the official implementation including advanced features
  • Small footprint (even smaller if you use a noparse build)
  • proto2js command line utility


Tests Build Status



Daniel Wirtz (maintainer), Frank Xu, Dretch, shirmin, Nikolai Vavilov

License: Apache License, Version 2.0 - Logo derived from W3C HTML5 Logos (CC A 3.0)

npm loves you