The Blob() constructor returns a new Blob object. The content of the blob consists of the concatenation of the values given in the parameter array.


new Blob(array)
new Blob(array, options)



An Array of ArrayBuffer, ArrayBufferView, Blob, string objects, or a mix of any of such objects, that will be put inside the Blob. USVString objects are encoded as UTF-8.

options Optional

An optional object of type BlobPropertyBag which may specify any of the following properties:

type Optional

The MIME type of the data that will be stored into the blob. The default value is the empty string, ("").

endings Optional Non-Standard

How to interpret newline characters (\n) within the contents, if the data is text. The default value, transparent, copies newline characters into the blob without changing them. To convert newlines to the host system's native convention, specify the value native.

Return value

A new Blob object containing the specified data.


const array = ['<a id="a"><b id="b">hey!</b></a>']; // an array consisting of a single DOMString
const blob = new Blob(array, {type : 'text/html'}); // the blob


File API
# constructorBlob

Browser compatibility

BCD tables only load in the browser

See also

  • The deprecated BlobBuilder interface which this constructor replaces.