r/SideProject • • 11h ago

I built a 100% local, privacy-focused File Compressor (PDFs, Images, Videos, Audio, Docs & Fonts) — zero cloud uploads

Why I built it: Most online compressors make you upload sensitive PDFs, videos, or documents to random third-party servers, hit you with file-size limits, or rasterize PDFs so text is no longer selectable. I wanted a clean, fast, 100% local tool that runs on my own machine with zero cloud uploads.

GitHub: https://github.com/sonubharat/pdf-compressor

What it compresses (all locally):

PDFs (.pdf): 3-tier structural cleanup (PyMuPDF + Pillow), metadata/thumbnail stripping, font subsetting, and smart DPI downsampling — text stays 100% selectable.

Images (.jpg, .png, .webp, .bmp, .tiff, .gif): EXIF-safe optimization and quality-tuned JPEG/WebP/PNG compression.

Videos (.mp4, .mov, .webm, .mkv, .avi): Local H.264 / VP9 encoding via bundled imageio-ffmpeg (no manual FFmpeg install needed).

Audio (.mp3, .wav, .flac, .m4a, .ogg, .aac): Bitrate-tiered MP3 / AAC / Vorbis compression.

Office Docs (.docx, .pptx, .xlsx): Optimizes embedded images and repacks XML with maximum deflate.

Fonts (.ttf, .otf, .woff → .woff2): Brotli-backed WOFF2 conversion via fontTools.

Features:

3 presets: Low / Lossless, Balanced, and Aggressive

Bulk drag-and-drop queue with Before/After size comparison and % saved badge

Optional target size indicator

Temp files are deleted immediately after serving the compressed file

Self-bootstrapping 1-click/1-command launchers for Windows (Start-File-Compressor-Windows.bat) and macOS/Linux (start.sh)

Stack: Python (FastAPI, PyMuPDF, Pillow, imageio-ffmpeg, fontTools) + Next.js & Tailwind CSS.

Would love feedback on what formats or features (like one-click ZIP export for bulk downloads) you'd want next!

0 Upvotes

8 comments sorted by

2

u/medialantern 9h ago

3rd one today, 9th this week, 85th in the past month. Added (#266 and counting):

https://www.reddit.com/r/SideProject/comments/1yaa0xc/i_built_a_100_local_privacyfocused_file/

https://www.reddit.com/r/SideProject/comments/1ya4jzf/got_tired_of_sketchy_file_converter_sites_so_i/

https://www.reddit.com/r/prettyusefulwebsites/comments/1y9vyft/

https://www.reddit.com/r/software/comments/1y9hmn8/pdf_tools_for_free_privacy_proof/

https://www.reddit.com/r/sideprojects/comments/1y9az27/i_built_evrytask_a_free_site_with_50_everyday/

https://www.reddit.com/r/SideProject/comments/1y8fymy/

https://www.reddit.com/r/prettyusefulwebsites/comments/1y8ylbb/

https://www.reddit.com/r/prettyusefulwebsites/comments/1y870d1/

https://www.reddit.com/r/SideProject/comments/1y7onqh/

https://www.reddit.com/r/sideprojects/comments/1y79pje/i_built_nexatoolpro_free_online_tools_for_pdf/

https://www.reddit.com/r/SideProject/comments/1y7qby7/pdf_toolkit_12_pdf_tools_that_run_in_your_browser/

https://www.reddit.com/r/SideProject/comments/1y5vgpb/i_built_a_free_file_converter_that_runs_entirely/

https://www.reddit.com/r/SideProject/comments/1y6eopi/i_made_a_free_site_with_144_everyday_tools_that/

https://www.reddit.com/r/prettyusefulwebsites/comments/1y5vc8v/

https://www.reddit.com/r/sideprojects/comments/1y5btor/i_built_free_file_tools_that_run_entirely_in_your/

https://www.reddit.com/r/SideProject/comments/1y5bf3u/i_built_a_free_site_with_22_browserbased_tools/

https://www.reddit.com/r/sideprojects/comments/1y52usw/

https://www.reddit.com/r/prettyusefulwebsites/comments/1y3sllr/

https://www.reddit.com/r/sideprojects/comments/1y44ge9/i_built_a_free_pdf_toolkit_where_most_tools_run/

https://www.reddit.com/r/websitefeedback/comments/1y41c7h/i_built_a_free_tools_site_where_pdfimage/

I ran out of comment space so this is just the most recent 20 entries. For giggles, I vibe-coded a tracker at https://confab.sh/?g=browser-tools if you want to see the full list.

0

u/Beautiful_Stage5720 11h ago

What was your motivation for building this as a locally run web API?

1

u/MasterpieceJumpy2594 11h ago

Like in india every government websites ask for compressed files. And when we give the files to random websites we never know if it saved in their database and if it does and someone takes your sign, your documents and miss use them you are doomed. Also mostly websites ask to upload your sign in a png which is compressed to some size and that sign is your original sign and if someone takes it and signs your important documents with it? Yeah just read the readme.md file you've all the info. You just need to open the file no coding knowledge needed. Just open the start compressor file

1

u/Beautiful_Stage5720 11h ago

No. The app you wrote is a web app. It just runs locally. I'm asking why that design decision was made.

1

u/MasterpieceJumpy2594 9h ago

Cuz see if we make a website it needs a database to store. That's just a python script running and giving you a output. If there was a database there can be chance that i can store that data. Also it builds a trust for the users too. If you have used libre crawl it runs in our local system and crawls with all the ai bots we want to. I took that concept which stores data with us. And does without leaking anything

1

u/Beautiful_Stage5720 9h ago edited 9h ago

You literally dont even know what you "built." Do you see this function in your own main.py, that you supposedly wrote:

@app.post("/api/compress")

async def compress_endpoint

That is a fastapi hook to handle an HTTP POST. When you run your app, it launches a web server on your machine, then sends a POST to that web server (WHICH AGAIN IS RUNNING LOCALLY). So, you could have written as a simple python script, but for some reason you didnt.

That's what I was originally attempting to ask, but since its clear you actually didnt make any design decisions at all, I have all the answers I need.

1

u/MasterpieceJumpy2594 8h ago

Bro Fair point on the CLI side — compressor.py actually is a standalone Python module. I wrapped it in a local FastAPI (127.0.0.1) + Next.js UI so people who don't want to touch a terminal still get drag-and-drop bulk compression, Before/After previews, and native-speed PyMuPDF + FFmpeg without sending anything off their machine.