Back to Creations

Detect-File-Encoding-And-Language

The open-source package that became an unexpected success.

Active
NPM Package
180,000+ Monthly Downloads
An Accidental Hit

This package was born out of necessity. While building the Movie Subtitles extension, I couldn't find a reliable tool to detect the character encoding and language of user-uploaded files. I wasn't familiar with AWS or Google Cloud Platform, and existing npm packages either didn't work for me or had unclear instructions.

I thought: "It can't be that difficult to detect the language of a text file." So I started working on it myself and decided—well, if I'm doing this for my Chrome extension, I might as well share it with other people who might be in a similar situation.

What's really interesting is that this was originally just a byproduct of the movie subtitles project—but now it has around 180,000 downloads each month, compared to the movie subtitles extension, which has about 8,000 active users. It also got the most attention in job interviews and contributed the most to landing my first job as a software developer.

Key Features

40+ Languages Supported

Accurately detects over 40 languages and various character encodings with high precision.

Multiple Environments

Works in Node.js, the browser, and as a command-line tool.

Easy Integration

Simple API that requires no external keys or complex setup.

Multiple File Formats

Supports .txt, .srt, .sub, .html, .csv, and .tsv files with best results on large inputs.

Why I Built It

I was building the Movie Subtitles Chrome extension and struggling with encoding issues when users uploaded subtitle files in different languages. The existing solutions either didn't work reliably or required complex cloud service setups that I wasn't ready for as a beginner.

I wanted to create something that was completely free, required no API keys, and had clear, simple instructions. For everyone who was in a similar situation as I was—maybe beginners who don't know how to use AWS, or developers who just need a straightforward solution—I thought I'd open source it and make sure it's easy to use.

Impressive Growth
180K+
Monthly Downloads
40+
Languages Detected
100%
Free & Open Source
Career Impact

Most Interview-Worthy Project

When it came to landing my first job as a developer, this project got the most attention in interviews. The combination of solving a real problem, open-sourcing the solution, and achieving significant adoption demonstrated both technical skills and product thinking that employers valued.

Use It Today

Join thousands of developers who rely on this package for reliable language and encoding detection.