How Do Online File Viewers Work?
F
FILES Team
·
·
4 min read
Modern browsers ship with powerful APIs that let websites open files entirely on the client — no upload, no server, total privacy.
The File API
The File and FileReader APIs let JavaScript read a file the user selected, byte by byte.
Object URLs
URL.createObjectURL() creates a temporary in-memory URL pointing at a file. We feed that URL to an <img>, <video>, <audio> or <iframe> for instant preview.
Canvas for images
For conversions (like JPG to PNG) we draw the image onto a <canvas> and call toBlob() — all locally.
Try it yourself with our online viewer or converter.
Try it yourself
Open our free tools and put what you learned into practice.