AR.js - Augmented Reality for the Web

Augmented Website

npm npm Build Status
Gitter chat Patreon donate button Twitter Follow

I am focusing hard on making AR for the web a reality. This repository is where I publish the code. Contact me anytime @jerome_etienne. Stuff is still moving fast, we have reached a good status though. An article has been published on uploadvr. So I wanted to publish this so people can try it and have fun with it :)

🚀For more updated stuff about AR.js, new versions and more, you can follow @nicolocarp and Watch this repo!

Key points:

Try it on Mobile

It works on all platforms. Android, IOS and window phone. It runs on any browser with WebGL and WebRTC (for iOS, you need to update to iOS11),

To try it on your phone, it is only 2 easy steps, check it out!

  1. Open this hiro marker image in your desktop browser.
  2. Open this augmented reality webapps in your phone browser, and point it at your screen.

You are done! It will open a webpage which read the phone webcam, localize a hiro marker and add 3d on top of it!

What “Marker based” means

AR.js uses artoolkit, and so it is marker based. artoolkit is a software with years of experience doing augmented reality. It is able to do a lot!

It supports a wide range of markers: multiple types of markers pattern/barcode multiple independent markers at the same time, or multiple markers acting as a single marker up to you to choose.

More details about markers:


⚠️ Please always give a look for new undocumented features on the Changelog until the documentation has been updated.

Get Started

Augmented reality for the web in less than 10 lines of html

<!doctype HTML>
<script src=""></script>
<script src=""></script>
  <body style='margin : 0px; overflow: hidden;'>
    <a-scene embedded arjs>
      <a-marker preset="hiro">
          <a-box position='0 0.5 0' material='color: yellow;'></a-box>
      <a-entity camera></a-entity>

See on codepen

A-Frame magic :) All details are explained in this super post “Augmented Reality in 10 Lines of HTML - AR.js with a-frame magic” by @AndraConnect.

Guides for beginners

We started a AR.js blog, thus we can write about all the crazy ideas related to AR.js.

Advanced guides


Try to get inspired by this great works:

Related Projects

Augmented Website

Seminal post explaining the concept. The service is available

Augmented Website




We are still early in the project but here are some initial numbers to give you an idea.

Obviously you mileage may vary. The performance you get will depend on 3 things: How heavy your 3D is, How you tune your parameters and the hardware that you are using.

Standing on the Shoulders of Giants

So we shown it is now possible to do 60fps web-based augmented reality on a phone. This is great for sure but how did we get here ? By standing on the shoulders of giants! It is thanks to the hard work from others, that we can today reach this mythic 60fps AR. So I would like to thanks :

Only thanks to all of them, I could do my part : Optimizing performance from 5fps on high-end phone, to 60fps on 2years old phone.

After all this work done by a lot of people, we have a web-based augmented reality solution fast enough for mobile!

Now, many people got a phone powerful enough to do web AR in their pocket. I think this performance improvement makes web AR a reality. i am all exited by what people are gonna with it :)


What’s New?

Recently, we’ve been getting creative and working on developing new things with AR.js. One of them is playing around with shadows, syncing the position of virtual lights with reality for a more life-like finish: screen shot 2017-03-16 at 21 06 24

We’ve been collaborating very closely with Fredrick Blomqvist. His input has had a great impact on AR.js innovation and we want to thank him. Together, we’ve been implementing refraction, giving the 3d a transparent/glassy effect. It ended up having a nice polished look. What do you guys think?

screen shot 2017-03-06 at 16 31 28

Other crazy ideas we’ve been working on include a hole in the wall and a portal into another world. We want to take AR.js to new dimensions.

screen shot 2017-03-12 at 15 19 51 screen shot 2017-03-07 at 10 08 39



What’s Next ?

We did good on performance, but there are still a lot of room for optimisation. Using webworkers would increase cpu usage. Compiling in webassembly instead of asm.js should improve loading time and likely cpu performance. And obviously, we can still do more parameters tweaking :)

I would like people start experience augmented reality and play with it. This is highly creative! Just look at this puzzle game in #AR playing with mirror and laser beam. You could do it with AR.js, so opensource and running on normal phones, no need to buy a new device. isn’t that great!

Augmented reality on phone have applications in many fields: history education , science or gaming. I exited to see what people will do with AR.js :)

Browser Support

Demo tested on the following browser setups:

Credits: @HelloDeadline, @sorianog


It is all open source! jsartoolkit5 is under LGPLv3 license and additional permission. And All my code in AR.js repository is under MIT license. :)

For legal details, be sure to check jsartoolkit5 license and AR.js license.

Last but not least