This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Window.URL property returns an object that provides static methods used for creating and managing object URLs. It can also be called as a constructor to construct URL objects.

Note: This feature is available in Web Workers.


Calling a static method:

img.src = URL.createObjectURL(blob);

Constructing a new object:

var url = new URL("../cats/", "");


Specification Status Comment
The definition of 'URL' in that specification.
Living Standard Initial definition

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 8.0[2] 4.0 (2.0)[1]
19.0 (19.0)
10.0 15.0[2] 6.0[2]
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes)[2] 14.0 (14.0)[1]
19.0 (19.0)
(Yes) 15.0[2] 6.0[2]

[1] From Gecko 2 (Firefox 4) to Gecko 18 included, Gecko returned an object with the non-standard nsIDOMMozURLProperty internal type. In practice, this didn't make any difference.

[2] Implemented under the non-standard name webkitURL.

See also

Document Tags and Contributors

Last updated by: chrisveness,