Home / Definitions / JavaScript FileReader

JavaScript FileReader

Webopedia Staff
Last Updated May 24, 2021 8:03 am

JavaScript FileReader is an object that reads data from BLOBs and files on the client side. Using JavaScript FileReader lets users read files from their own computer system using a web browser (that is, the client) instead of using the server. Software developers use JavaScript FileReader to reduce the processing burden on servers. This helps prevent websites or applications from running slowly.

Developers can specify the file format JavaScript FileReader will read, and they can set rules for how FileReader interprets the data stored in a file. For example, if you’re coding a résumé upload tool for a company website, you can use JavaScript FileReader to generate an image preview of an applicant’s résumé before they confirm that they want to upload it to the company’s servers.

Another use case for Javascript FileReader is to parse data from a plain text file, like a comma-separated values (CSV) file. This is useful for preparing to upload large amounts of data to a database.