Upload.js: the easiest way to upload files.

Upload.js is the fastest way to add file uploads to your web app. Files are uploaded to the Upload API giving you instant file uploading, file processing (e.g. image resizing) and file hosting functionality.

1 Install Upload.js

Copy-and-paste this code snippet to add a working file upload button to your web app.

(Don't forget: you'll need an Upload account!)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html>
<head>
 <script src="https://js.upload.io/upload-js/v1"></script>
 <script>
   var upload = new Upload({apiKey: "..."})
   var uploadFile = upload.createFileInputHandler({
     onUploaded: ({ fileUrl, fileId }) => {
       alert(`File uploaded! ${fileUrl}`);
     }
   });
 </script>
</head>
<body>
 <input type="file" onchange="uploadFile(event)" />
</body>
</html>
  • No servers or configuration
  • No boilerplate code
  • Start uploading files in 60 seconds

2 Upload a file

With your button created, try uploading a file. The result will contain a file ID, which can be used at any time to download the file. You should save the file ID to your backend API.

File URLhttps://files.upload.io/File IDx89e18fe4x3
  • Files hosted on our ultra-fast CDN
  • Basic plans: CDN covers 100 locations worldwide
  • Pro plans: CDN covers 300+ locations worldwide

3 Transform your files

Now create a transformation through the Upload Dashboard. If you paste a transformation's slug to the end of a file URL, the result will be a transformation of that file, e.g. a resized image.

https://files.upload.io/File IDx89e18fe4x3/Transformation Slugpng;w=1024;h=768
  • Transform files via the URL.
  • Resize images, extract zips, and more.
  • Even run your own code!

Want to use Upload's file transformations, but with your own file storage?

Image Description

Loved by developers worldwide

Developers enjoy using Upload.js as a lightning-fast way to add file uploads to web apps.
SVG

Robust & lightweight

Upload.js is 7KB when minified and gzipped (including its dependencies) and comes complete with TypeScript definitions.

SVG

Zero setup

No infrastructure to provision or boilerplate code to write: just install Upload.js, enter your API key, and start uploading files.

SVG

Fast CDN

Upload's content delivery network (CDN) serves your files from 300+ locations worldwide, giving your users ultra-low-latency downloads.

SVG

Comprehensive docs

Our documentation is clear, easy to follow, and cuts straight to the point. We promise not to waste any of your time.

SVG

URL-based transformations

Transform your uploaded files via the URL, using either pre-made transformations, or custom ones you've written using JavaScript.

SVG

Access-protected URLs

Upload allows you to authenticate uploads and downloads via your backend API, giving you complete control over file access.

Get Started

Join the developers already using Upload.js

Get Started

It takes as little as 60 seconds to add Upload.js to your website.